[Orbit-python-list] potential buffer underflow
Status: Inactive
Brought to you by:
tack
From: Adam O. <rh...@d2...> - 2002-02-13 15:02:07
|
In CORBA_ORB_PyObject__string_to_object in CORBA_ORB.c it trims off trailing whitespace from the IOR. But if the IOR doesn't contain any non-whitespace it could underflow, destroying stuff before the buffer if they match the isspace() check. I suggest changing it to: for (i = strlen(s) - 1; i >= 0 && isspace(s[i]); i--) s[i] = 0; -- Adam Olsen, aka Rhamphoryncus |