diff options
author | albert <> | 2005-10-30 23:52:35 +0000 |
---|---|---|
committer | albert <> | 2005-10-30 23:52:35 +0000 |
commit | c03b9f6deb31788552ea5f50e4131c7d959524d5 (patch) | |
tree | 282f354d854946d653ab8be9795dda7bd4fd56d5 /pwdx.c | |
parent | 29cbc635618d72b0463cd5a3badaf3eaa7c94533 (diff) | |
download | procps-ng-c03b9f6deb31788552ea5f50e4131c7d959524d5.tar.gz |
fix buffer overflow
Diffstat (limited to 'pwdx.c')
-rw-r--r-- | pwdx.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -59,7 +59,7 @@ int main(int argc, char* argv[]) for (i = 1; i < argc; i++) { if (regexec(&re, argv[i], 0, NULL, 0) != 0) { - sprintf(buf, "pwdx: invalid process id: %s\n", argv[i]); // FIXME (overflow) + snprintf(buf, sizeof buf, "pwdx: invalid process id: %s\n", argv[i]); die(buf); } if (!strcmp("-V", argv[i]) || !strcmp("--version", argv[i])) |