Re: strange problem with self-compiled software on FC 5 T2...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ulrich Drepper wrote:
Patrick von der Hagen wrote:
Now, whom should I contact? glibc, gnu-c or gnu-c++?

Nobody but the person who wrote that code.  You pass a pointer to a
'char' variable for the %s format element.  Even *if* you only read one
character the terminating NUL byte will overwrite the next byte.  That's
likely your variable 'j'.
It's really amazing how many people missed that one and that several compilers (e.g. gnu-gcc/g++ 3.5) produced binaries that worked flawlessly. But you are right, "c" was placed next to "j" in memory, so j has been damaged by invocing fscanf. Fixing the format-string solved my problems.

Sorry for all that noise.
--
CU,
   Patrick.

--
fedora-test-list mailing list
fedora-test-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-test-list

[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]