sudo-project / sudo

Utility to execute a command as another user
https://www.sudo.ws
Other
1.15k stars 208 forks source link

Write to dst only if sudo_ldap_value_cat succeeds #288

Closed AtariDreams closed 1 year ago

AtariDreams commented 1 year ago

There's no point in writing to memory if it has to be freed anyway.

millert commented 1 year ago

sudo_ldap_value_cat() requires that the string being passed in be NUL-terminated so the:

*dst = '\0';

must happen first.