C/C++
C or C++ : Unsafe function: gets
Classification
PCI DSS 4.0
Overview
The gets function used is insecure because it can lead to a buffer overflow. This may lead to incorrect behavior or crash of the application.
The C library function char *gets(char *str) reads a line from stdin and stores it into the string pointed to by str. It stops when either the newline character is read or when the end-of-file is reached, whichever comes first. The function gets() is vulnerable to attacks such as buffer overflow and should not be used.
References
MEDIUM
DerScanner Severity Score
Check your C/C++ code for this vulnerability, free
Request a free pilot of DerScanner. We give you access and help with the first scan. It works in the cloud and on-premise.
Try it on your code, free
By submitting this form, I acknowledge that DerScanner may process my personal data I provided above for purposes explained above. More details about the processing.
