diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-12-31 22:30:36 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-12-31 22:30:36 +0000 |
commit | 618c3037024b4e5328531cdc07c6ceb7486f5329 (patch) | |
tree | 7c9f8d50c6f5fbd53f3df583c471f5d2e5c34202 /media-gfx/fontforge/files/20170731-gethex-unaligned.patch | |
parent | 76dfef0cec9170000357d2f354e412daf48941fc (diff) |
gentoo resync : 31.12.2017 (final resync this year)
Diffstat (limited to 'media-gfx/fontforge/files/20170731-gethex-unaligned.patch')
-rw-r--r-- | media-gfx/fontforge/files/20170731-gethex-unaligned.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/media-gfx/fontforge/files/20170731-gethex-unaligned.patch b/media-gfx/fontforge/files/20170731-gethex-unaligned.patch new file mode 100644 index 000000000000..812f7a444721 --- /dev/null +++ b/media-gfx/fontforge/files/20170731-gethex-unaligned.patch @@ -0,0 +1,22 @@ +fix unaligned access in gethex() + +--- a/fontforge/sfd.c ++++ b/fontforge/sfd.c +@@ -3393,6 +3393,7 @@ + static int gethex(FILE *sfd, uint32 *val) { + char tokbuf[100]; int ch; + char *pt=tokbuf, *end = tokbuf+100-2; ++ uint32 u; + + while ( isspace(ch = nlgetc(sfd))); + if ( ch=='#' ) +@@ -3416,7 +3417,8 @@ + } + *pt='\0'; + ungetc(ch,sfd); +- *val = strtoul(tokbuf,NULL,16); ++ u = strtoul(tokbuf,NULL,16); ++ memcpy(val, &u, sizeof(u)); + return( pt!=tokbuf?1:ch==EOF?-1: 0 ); + } + |