Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1ceb5fb

Browse files
committed
Repair a botched PyOS_snprintf conversion.
1 parent 23ae987 commit 1ceb5fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/posixmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ os2_strerror(char *msgbuf, int msgbuflen, int errorcode, char *reason)
432432
if (rc == NO_ERROR)
433433
os2_formatmsg(msgbuf, msglen, reason);
434434
else
435-
PyOS_snprintf(msgbuf, sizeof(msgbuf),
435+
PyOS_snprintf(msgbuf, msgbuflen,
436436
"unknown OS error #%d", errorcode);
437437

438438
return msgbuf;

0 commit comments

Comments
 (0)