Changeset 5547211b for zephyr.c


Ignore:
Timestamp:
Dec 13, 2008, 5:32:06 PM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Children:
1c014eec
Parents:
44fc93b
git-author:
Anders Kaseorg <andersk@mit.edu> (12/06/08 23:20:19)
git-committer:
Nelson Elhage <nelhage@mit.edu> (12/13/08 17:32:06)
Message:
Replace questionable sprintf(buf, "%s...", buf, ...) pattern, which is
broken by -D_FORTIFY_SOURCE.

perl -pe 's/(sprintf\s*\(\s*([^,]*))(\s*,\s*")%s([^"]*"\s*,)\s*\2\s*,/\1 + strlen(\2)\3\4/g'
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zephyr.c

    r451db9e r5547211b  
    814814    ZGetLocations(&locations,&one);
    815815    myuser=short_zuser(user);
    816     sprintf(out, "%s%s: %s\t%s\t%s\n", out, myuser,
     816    sprintf(out + strlen(out), "%s: %s\t%s\t%s\n", myuser,
    817817            locations.host ? locations.host : "?",
    818818            locations.tty ? locations.tty : "?",
Note: See TracChangeset for help on using the changeset viewer.