Re: [PATCH libXfont] Fix buffer read overrun

2014-04-21 Thread Jasper St. Pierre
Always using strlen(s); should be fine. The compiler will optimize it out for a literal string anyway. On Fri, Apr 18, 2014 at 4:39 PM, Keith Packard kei...@keithp.com wrote: Alan Coopersmith alan.coopersm...@oracle.com writes: They work, as long as you only ever pass a literal string to

Re: [PATCH libXfont] Fix buffer read overrun

2014-04-18 Thread Keith Packard
Alan Coopersmith alan.coopersm...@oracle.com writes: glamor/glamor_xv.c:#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) hw/kdrive/src/kinput.c:#define AtomFromName(x) MakeAtom(x, strlen(x), 1) xkb/ddxBeep.c:#define MAKE_ATOM(a)MakeAtom(a,sizeof(a)-1,TRUE) xkb/xkbDflts.h:#define

Re: [PATCH libXfont] Fix buffer read overrun

2014-04-18 Thread Alan Coopersmith
On 04/18/14 11:43 AM, Keith Packard wrote: Alan Coopersmith alan.coopersm...@oracle.com writes: glamor/glamor_xv.c:#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) hw/kdrive/src/kinput.c:#define AtomFromName(x) MakeAtom(x, strlen(x), 1) xkb/ddxBeep.c:#define MAKE_ATOM(a)

Re: [PATCH libXfont] Fix buffer read overrun

2014-04-18 Thread Keith Packard
Alan Coopersmith alan.coopersm...@oracle.com writes: They work, as long as you only ever pass a literal string to them, not a pointer. Right, but there's no type safety in that. Seems like a reasonable simplification in the server - hard to use from other modules (libXfont, drivers, etc.)

Re: [PATCH libXfont] Fix buffer read overrun

2014-04-11 Thread Peter Harris
On 2014-04-07 15:49, Alan Coopersmith wrote: On 04/ 7/14 11:29 AM, Peter Harris wrote: FreeType is only eight bytes long. The atom FreeType\x00\x?? is probably not what the author intended. Reviewed-by: Alan Coopersmith alan.coopersm...@oracle.com Thanks. Pushed. Peter Harris --

[PATCH libXfont] Fix buffer read overrun

2014-04-07 Thread Peter Harris
FreeType is only eight bytes long. The atom FreeType\x00\x?? is probably not what the author intended. Signed-off-by: Peter Harris phar...@opentext.com --- src/FreeType/ftfuncs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FreeType/ftfuncs.c b/src/FreeType/ftfuncs.c

Re: [PATCH libXfont] Fix buffer read overrun

2014-04-07 Thread Alan Coopersmith
On 04/ 7/14 11:29 AM, Peter Harris wrote: FreeType is only eight bytes long. The atom FreeType\x00\x?? is probably not what the author intended. Signed-off-by: Peter Harris phar...@opentext.com --- src/FreeType/ftfuncs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH libXfont] Fix buffer read overrun

2014-04-07 Thread walter harms
Am 07.04.2014 20:29, schrieb Peter Harris: FreeType is only eight bytes long. The atom FreeType\x00\x?? is probably not what the author intended. Signed-off-by: Peter Harris phar...@opentext.com --- src/FreeType/ftfuncs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH libXfont] Fix buffer read overrun

2014-04-07 Thread Alan Coopersmith
On 04/ 7/14 01:25 PM, walter harms wrote: Am 07.04.2014 20:29, schrieb Peter Harris: FreeType is only eight bytes long. The atom FreeType\x00\x?? is probably not what the author intended. Signed-off-by: Peter Harris phar...@opentext.com --- src/FreeType/ftfuncs.c | 2 +- 1 file changed, 1