Email List: Xaustin-review-lX
[All Lists]

Defect in XSH strdup -- duplicate a string

To: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Defect in XSH strdup -- duplicate a string
From: yyyyyyyy@xxxxxxxxxx
Date: Fri, 19 Sep 2003 17:34:27 +0100 (BST)
        Defect report from : Alexander Terekhov , IBM

(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)

@ page 1415 line 43742 section strdup -- duplicate a string editorial 
{alt-strdup-2003-09-19}

Problem:

Edition of Specification (Year): 2003

Defect code :  1. Error

The standard says:

43742 The strdup() function may fail if:
43743 [ENOMEM] Storage space available is insufficient.

"may" is wrong. Resource-not-available errors are mandatory.

Action:

Replace "may" with "shall".

Unfortunately, there are many other places that also need 
similar patching. Consistency, you know. If you accept
that change, more DRs will follow.

<Prev in Thread] Current Thread [Next in Thread>
  • Defect in XSH strdup -- duplicate a string, terekhov <=