Changeset b9cb41b for zephyr.c


Ignore:
Timestamp:
Dec 6, 2008, 11:25:33 PM (16 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
56d0189
Parents:
49a8434
git-author:
Anders Kaseorg <andersk@mit.edu> (12/06/08 23:20:19)
git-committer:
Anders Kaseorg <andersk@mit.edu> (12/06/08 23:25:33)
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 rb9cb41b  
    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.