Fix an off-by-one error on size limit NUL termination outside the loop, and thus make sure then that size is always > 0 so that we don't write outside the bounds. Check there's enough room when quoting '\\', and terminate the string and return otherwise. Remove XXX comments now that the code works fine.
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||