I migrated a c application using the cc compiler from AIX version 5 to Solaris 10.
First, I compiled my application with cc compiler using Solaris 10. I did not use special compilation options and compiled without error.
Then, I run the application and found the first buffer overflow, then corrected the application y run it again. I founded more buffer overflow in different places of the application.
A buffer overflow occurs when data written to a buffer, due to insufficient bounds checking, corrupts data values in memory addresses adjacent to the allocated buffer. Most commonly this occurs when copying strings of characters from one buffer to another.
I understand that the right thing would be to detect case by case, each of these errors and make the correction in the corresponding variable, however, the time is important.
Are there any option to compile or a pragma directive or a kernel parameter or something that makes the c application using Solaris 10 behave the same way as in cc compiler for AIX ?
Waiting for your help!