And you forget return value check. malloc may return null.
Murphy, Ged (Bolton) wrote:
turner(a)svn.reactos.org wrote:
+ bc->raw_params = malloc(_tcslen(param));
+ _tcscpy(bc->raw_params,param);
Please check the docs, I don't have access to any at the moment, but if I
recall correctly both strlen and wcslen return the number of chars, not
including the '/0'.
This will therefore mean we miss off the '/0' for ASCII builds and only have
half the required space for unicode builds.
Ged.
_______________________________________________
Ros-dev mailing list
Ros-dev(a)reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev