...
Code Block | ||
---|---|---|
| ||
char buf[256]; ssizet_t len; if ((len = readlink("/usr/bin/perl", buf, sizeof(buf)-1)) != -1) buf[len] = '\0'; else { /* handle error condition */ } |
Risk
...
Assessment
Failing to properly terminate the result of readlink()
can result in abnormal program termination.
...