Re: %j for printf(9)
Dag-Erling Smorgrav <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.audit |
|---|---|
| Message-ID | <[email protected]> |
Bruce Evans <[email protected]> writes: > When splitting this, you might consider fixing he disorder in it (but fixing > the external disorder and misarrangement of the other declarations of ints > should be in a separate patch). Removed > Unrelated style fix :-). Removed > Another unrelated style fix. This one makes the patch harder to read. Removed > Please remove the 'n' case, and check this a bit. I forgot to remove it > soon after rev.1.48. Done. It wasn't used anywhere in the kernel. I also took the liberty of implementing the "real" %n: case 'n': if (jflag) *(va_arg(ap, intmax_t *)) = retval; else if (qflag) *(va_arg(ap, quad_t *)) = retval; else if (lflag) *(va_arg(ap, long *)) = retval; else *(va_arg(ap, int *)) = retval; break; > This seems to print all the garbage for %<garbage>. It might be useful > to mark up the garbage. But gcc will detect the garbage at compile time > for literal strings. The original code would print different, possibly incorrect garbage. DES -- Dag-Erling Smorgrav - [email protected] To Unsubscribe: send mail to [email protected] with "unsubscribe freebsd-audit" in the body of the message