CWE-785

Use of Path Manipulation Function without Maximum-sized Buffer

Medium

Description

The product invokes a function for normalizing paths or file names, but it provides an output buffer that is smaller than the maximum possible size, such as PATH_MAX.

Potential Impact

How to Fix

Implementation

Always specify output buffers large enough to handle the maximum-size possible result from path manipulation functions.

Detection Methods

Related Weaknesses

References

View on MITRE CWE Database →

Need Help Fixing This Vulnerability?

Our security experts can help you identify and remediate CWE-785 vulnerabilities in your codebase.

Get Security Assessment