Menu

#2 secure_parms broken in WIn32 version

open
nobody
None
5
2002-07-24
2002-07-24
Anonymous
No

In win32/NpPerlPlus.cpp, subroutine NPP_Write, lines
995-996:

strncpy(This->secure_parms, (char *)buffer, CGISIZE);
This->secure_parms[CGISIZE-1] = '\0';

The code copies a single character into This->secure_parms
and immediately overwrites it with a null character.
Change
the second line to:

This->secure_parms[CGISIZE] = '\0';

This will null-terminate the string properly instead of
clobbering it.

Thanks.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.