17 lines
532 B
Text
17 lines
532 B
Text
- Don't use printf %n.
|
|
|
|
Index: doc/mkdefsinc.c
|
|
--- doc/mkdefsinc.c.orig
|
|
+++ doc/mkdefsinc.c
|
|
@@ -262,8 +262,9 @@ main (int argc, char **argv)
|
|
}
|
|
n = strlen (opt_date) + strlen (month) + 2 + 1;
|
|
p = xmalloc (n);
|
|
- snprintf (p, n, "%d %n%s %d",
|
|
- atoi (opt_date+8), &monthoff, month, atoi (opt_date));
|
|
+ snprintf (p, n, "%d %s %d",
|
|
+ atoi (opt_date+8), month, atoi (opt_date));
|
|
+ monthoff = strchr (p, ' ') - p + 1;
|
|
xfree (opt_date);
|
|
opt_date = p;
|
|
}
|