Skip to content
Commit 97ad4c64 authored by Florian Weimer's avatar Florian Weimer
Browse files

gshadow: Matching sgetsgent, sgetsgent_r ERANGE handling (bug 30151)



Before this change, sgetsgent_r did not set errno to ERANGE, but
sgetsgent only check errno, not the return value from sgetsgent_r.
Consequently, sgetsgent did not detect any error, and reported
success to the caller, without initializing the struct sgrp object
whose address was returned.

This commit changes sgetsgent_r to set errno as well.  This avoids
similar issues in applications which only change errno.

Reviewed-by: default avatarSiddhesh Poyarekar <siddhesh@sourceware.org>
(cherry picked from commit 969e9733)
parent 1d63573f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment