simon-git: halibut (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sun May 14 08:50:56 BST 2017
TL;DR:
c00d1c3 Add missing initialisations in the 'word' structure.
72b1eb1 Correct typo in initialisation in bk_paper.c.
90b5c25 Fill in the 'filetype' field for standard PS fonts.
41ef291 Fix two potential buffer under/overruns.
Repository: https://git.tartarus.org/simon/halibut.git
On the web: https://git.tartarus.org/?p=simon/halibut.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2017-05-14 08:50:56
commit c00d1c3b6003dbbb72439de0ebdb4a93c8763f65
web diff https://git.tartarus.org/?p=simon/halibut.git;a=commitdiff;h=c00d1c3b6003dbbb72439de0ebdb4a93c8763f65;hp=94831068fb5573b1ebdb9def9c2ad09f0694d45c
Author: Simon Tatham <anakin at pobox.com>
Date: Sun May 14 08:11:06 2017 +0100
Add missing initialisations in the 'word' structure.
The 'breaks' and 'aux' fields were filled in rather inconsistently at
various places where a word is created - especially the outlying ones
that manufacture pieces of document during internal processing of
contents, index, bibliography, cross-references etc rather than
directly from the input file. This has never led to any user-visible
behaviour change that I've noticed, but it made a lot of annoying
noise in the valgrind output, which got in my way last week when I was
trying to debug the CHM generation.
biblio.c | 2 ++
bk_paper.c | 1 +
contents.c | 4 ++++
keywords.c | 2 ++
4 files changed, 9 insertions(+)
commit 72b1eb1cd3e6b07cdf93fb5f158cba21691b3052
web diff https://git.tartarus.org/?p=simon/halibut.git;a=commitdiff;h=72b1eb1cd3e6b07cdf93fb5f158cba21691b3052;hp=c00d1c3b6003dbbb72439de0ebdb4a93c8763f65
Author: Simon Tatham <anakin at pobox.com>
Date: Sun May 14 08:28:30 2017 +0100
Correct typo in initialisation in bk_paper.c.
If you initialise a structure field for the first time with += rather
than =, that won't stop valgrind from saying it's uninitialised, and a
good job too!
bk_paper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
commit 90b5c251fd86c444f54184d0d30e3d6462cbb7ae
web diff https://git.tartarus.org/?p=simon/halibut.git;a=commitdiff;h=90b5c251fd86c444f54184d0d30e3d6462cbb7ae;hp=72b1eb1cd3e6b07cdf93fb5f158cba21691b3052
Author: Simon Tatham <anakin at pobox.com>
Date: Sun May 14 08:16:42 2017 +0100
Fill in the 'filetype' field for standard PS fonts.
This was another valgrind-spotted uninitialised variable. And although
you'd think the 'filetype' field is unimportant for fonts that aren't
loaded from a file anyway, it is important, because bk_pdf.c emits
different code for creating font subsets of Type 1 and TrueType fonts
- i.e. it needs to know what type the font has _after_ it's loaded,
not just how to load it.
psdata.c | 1 +
1 file changed, 1 insertion(+)
commit 41ef29132b50404f6157d83d1edf9a133e422c9f
web diff https://git.tartarus.org/?p=simon/halibut.git;a=commitdiff;h=41ef29132b50404f6157d83d1edf9a133e422c9f;hp=90b5c251fd86c444f54184d0d30e3d6462cbb7ae
Author: Simon Tatham <anakin at pobox.com>
Date: Sun May 14 08:08:57 2017 +0100
Fix two potential buffer under/overruns.
The one in wcwidth.c actually came up in one of my valgrind runs: if
you passed it a non-null-terminated wide string (specifically, one
that reaches invalid memory exactly when the length parameter runs
out), it would illegally load the character beyond the end of the
string before noticing that the length parameter said it shouldn't.
The one in bk_man.c may well not be able to come up at all, but I
spotted it in passing and I thought I might as well fix it - it makes
me twitch on general principles to see any use of buf[len-1] without
having checked len>0 first.
bk_man.c | 2 +-
wcwidth.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
More information about the tartarus-commits
mailing list