OpenSolaris

Printable Version Enter a New Search
Bug ID 6586072
Synopsis uu_warn_internal should be more precise in its newline detection
State 3-Accepted (Yes, that is a problem)
Category:Subcategory library:libuutil
Keywords oss-bite-size
Sponsor
Submitter
Reported Against snv_70
Duplicate Of
Introduced In
Commit to Fix
Fixed In
Release Fixed
Related Bugs
Submit Date 27-July-2007
Last Update Date 9-August-2008
Description
[dep, 26Jul2007]

  uu_warn_internal, used by the various forms of uu_warn and uu_die,
  checks to see if it should append the error text in the following 
  manner:

 96         if (strrchr(format, '\n') == NULL)
 97                 (void) fprintf(stderr, ERRNO_FMT, strerror(err));

  This, unfortunately, will cause the error text to be suppressed if 
  text follows the last newline in the supplied message.  We should 
  instead check that the newline is at the end of the string (which, 
  given the use of strrchr, the implementor probably had in mind):

    (c = strrchr(format, '\n') == NULL) || c[1] != '\0'
Work Around
N/A
Comments
N/A