IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 21 years ago

Closed 21 years ago

Last modified 20 years ago

#597 closed defect (fixed)

psStringNCopy fails to produce null-terminated string when nChar == 0

Reported by: Paul Price Owned by: robert.desonia@…
Priority: high Milestone:
Component: sys Version: 0.8.0
Severity: normal Keywords:
Cc:

Description

When nChar == 0, psStringNCopy will allocate a string of size nChar + 1, but it
is not null-terminated:

Ensure the last byte is NULL character
if (nChar > 0) {

returnValue[nChar] = '\0';

}

Removing the restriction results in the correct result:

Ensure the last byte is NULL character
returnValue[nChar] = '\0';

Change History (3)

comment:1 by robert.desonia@…, 21 years ago

Resolution: fixed
Status: newclosed

fixed in CVS

comment:2 by Paul Price, 20 years ago

Keywords: VERIFIED added

Bug has been resolved.... closing.

comment:3 by Paul Price, 20 years ago

Keywords: VERIFIED removed

Bugs have been fixed... closing.

Note: See TracTickets for help on using tickets.