Home / Vulnerability Database / C or C++ : Unsafe function: gets
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
Do you want to fix C or C++ : Unsafe function: gets in your application?
See also
C/C++
C or C++ : Dead store
C/C++
C or C++ : Use after free
C/C++
