Buffer Strlen Wcslen

The `strlen` family of functions does not handle strings that are not null terminated. This can lead to buffer over reads and cause the application to crash by accessing unintended memory locations. It is recommended that `strnlen` be used instead as a `maxlen` value can be provided. For more information please see: https://linux.die.net/man/3/strnlen If dev

IndexedPublic repositoryLowMedium confidenceVerifiedGPL-2.0-onlyC
greprules fetch gitlab-sast-c-buffer-rule-strlen-wcslen --engine opengrep

Description

The `strlen` family of functions does not handle strings that are not null terminated. This can lead to buffer over reads and cause the application to crash by accessing unintended memory locations. It is recommended that `strnlen` be used instead as a `maxlen` value can be provided. For more information please see: https://linux.die.net/man/3/strnlen If dev