On 19 Aug 2008, at 14:41, Aymeric Barthe wrote:

#ifdef WIN32
 if(filename[1] == ':' && filename[2] != '\\') // Memory overrun here!
   len+=3; /* relative filename - add / and ./ */
 else if(*filename == '\\')
   len-=2; /* two // from not needed in filename */
 else
   len++; /* / at start of path */
#else

I guess a calling an strlen() would do the trick, but I am not sure it
would be so efficient:
 if( (strlen(filename) >= 3) && filename[1] == ':' && filename[2] !=
'\\')

it could be

  if (filename[0] && filename[1] == ':' && filename[2] != '\\')

- Steve
_______________________________________________
redland-dev mailing list
[email protected]
http://lists.librdf.org/mailman/listinfo/redland-dev

Reply via email to