diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2010-06-10 11:39:57 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2010-06-10 11:39:57 +0000 |
commit | 250c0a02ac148ca0f8a4dcea1f7ec0e34b64c4a4 (patch) | |
tree | 472bfabb1b0d2b9ad6521e6207940208faf42ef5 /Build/source | |
parent | 0f510c9d7340bf01f7d6a3455b6c9ef69b7c6136 (diff) |
enlarge some of the sprintf buffers to prevent buffer overruns
git-svn-id: svn://tug.org/texlive/trunk@18862 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
5 files changed, 12 insertions, 6 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog index 9734ab31504..53f6a4f99ee 100644 --- a/Build/source/texk/web2c/luatexdir/ChangeLog +++ b/Build/source/texk/web2c/luatexdir/ChangeLog @@ -1,3 +1,9 @@ +2010-06-10 Taco Hoekwater <taco@luatex.org> + * luasocket/src/options.c, luafontloader/fontforge/fontforge/parsettfatt.c, + luafontloader/fontforge/fontforge/parsettf.c, + luafontloader/fontforge/fontforge/lookups.c: enlarge static buffers + for sprintf(). + 2010-06-04 Taco Hoekwater <taco@luatex.org> * luatex.c (shell_cmd_is_allowed): make sure only commands with diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c index df31efd5c16..9fbb67d5fd5 100644 --- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c +++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c @@ -1430,7 +1430,7 @@ void NameOTLookup(OTLookup *otl,SplineFont *sf) { if ( fl==NULL ) userfriendly = copy(lookuptype); else { - userfriendly = galloc( strlen(lookuptype) + 16); + userfriendly = galloc( strlen(lookuptype) + 40); #ifdef LUA_FF_LIB if ( (otl->lookup_type&0xff)>= 0xf0 ) { sprintf( userfriendly, "%s_<%d,%d>", lookuptype, diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c index 9ccd1d393dd..dc51b328e3d 100644 --- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c +++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c @@ -3594,7 +3594,7 @@ return; } static void privateaddint(struct psdict *private,char *key,int val) { - char buf[10]; + char buf[20]; if ( val==0 ) return; sprintf( buf,"%d", val ); @@ -3602,7 +3602,7 @@ return; } static void privateaddintarray(struct psdict *private,char *key,int val) { - char buf[10]; + char buf[20]; if ( val==0 ) return; sprintf( buf,"[%d]", val ); @@ -3610,7 +3610,7 @@ return; } static void privateaddreal(struct psdict *private,char *key,double val,double def) { - char buf[10]; + char buf[20]; if ( val==def ) return; sprintf( buf,"%g", val ); diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettfatt.c b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettfatt.c index fa466564027..1c01d821d8c 100644 --- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettfatt.c +++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettfatt.c @@ -5111,7 +5111,7 @@ static struct glyphvariants *ttf_math_read_gvtable(FILE *ttf,struct ttfinfo *inf char *pt; int ic_offset, pcnt; SplineChar *sc; - char ebuf[10], buffer[50], *ext; + char ebuf[20], buffer[50], *ext; fseek(ttf,start,SEEK_SET); ga_offset = getushort(ttf); diff --git a/Build/source/texk/web2c/luatexdir/luasocket/src/options.c b/Build/source/texk/web2c/luatexdir/luasocket/src/options.c index 5da3c518c28..1eaae8d6939 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/src/options.c +++ b/Build/source/texk/web2c/luatexdir/luasocket/src/options.c @@ -33,7 +33,7 @@ int opt_meth_setoption(lua_State *L, p_opt opt, p_socket ps) while (opt->name && strcmp(name, opt->name)) opt++; if (!opt->func) { - char msg[45]; + char msg[60]; sprintf(msg, "unsupported option `%.35s'", name); luaL_argerror(L, 2, msg); } |