signed char bug in regexp library

Mikulas Patocka mikulas at artax.karlin.mff.cuni.cz
Mon Feb 16 11:50:41 PST 2004


Hi

I ripped regexp library from FreeBSD 4 and use it in another program. I
get random crashes because the library casts char to int and uses it as
array index ... the most obvious case is engine.i:189:
register char *dp;
dp += charjump[(int)*dp];
but there are many more and I'm unable to spot them all.

When i compile library with -funsigned-char, it works fine. But it isn't
compiled with that flag in FreeBSD.

Mikulas


More information about the freebsd-hackers mailing list