I am using a popular memory checker "purify" to check my code. It reports "Out-of-bound read" (ABR) for the following printf statements:
It seems it gives this out-of-bound read for any printf() that involves %s. The purify users guide and ref manual do not give aclue.Code:struct passwd *pwuid = getpwuid(getuid()); static const char *compiler = "GCC"; printf("%s", compiler); printf("%s", __DATE__); printf("%s", pwuid->pw_dir);