Messages in this thread | | | Date | Fri, 2 Apr 2004 10:38:12 +0200 | From | Pavel Machek <> | Subject | Re: [PATCH/RFC] don't support %n in printk |
| |
Hi!
> The printf man page has this to say about '%n': > > "The number of characters written so far is stored into the integer > indicated by the int * (or variant) pointer argument. No argument > is converted." > > Very little code actually uses %n for that. Now days, %n has a much > more common use - in printf format string exploits. Since no kernel > code appears to be using %n (thus said grep), this patch removes > support for it. To preempt the obvious argument, I agree that printk > should look and behave as much as possible as printf - except where > it's harmful. We don't support floating point, for example, and I > doubt we should support %n - although I don't strongly care one way or > another.
You probably should search the kernel for any uses of %n and fix them... Pavel
-- When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |