|
Re: printf bug - beware!
Nice catch. The same problem occurs if you do this:
char tempBuf[] = "Some string >=40 characters...";
printf("%s", tempBuf);
The error is another strcpypgm2ram copied into a 40 char buffer without checking the length of the string in program memory.
printf_lib.c line 203 (unmodified version)
Basically anywhere in the printf libraries where strcpypgm2ram is used (which is quite often) there is a possibility for corruption.
|