Fix incorrect allocation size (perforce change 8918)

PR:		bin/36658
Submitted by:	Takanori Saneto <sanewo@ba2.so-net.ne.jp>
This commit is contained in:
des 2002-04-02 20:57:22 +00:00
parent 191bd7d163
commit 7ca517bc65

View File

@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $P4: //depot/projects/openpam/lib/pam_putenv.c#6 $
* $P4: //depot/projects/openpam/lib/pam_putenv.c#7 $
*/
#include <stdlib.h>
@ -73,7 +73,8 @@ pam_putenv(pam_handle_t *pamh,
/* grow the environment list if necessary */
if (pamh->env_count == pamh->env_size) {
env = realloc(pamh->env, pamh->env_size * 2 + 1);
env = realloc(pamh->env,
sizeof(char *) * (pamh->env_size * 2 + 1));
if (env == NULL)
return (PAM_BUF_ERR);
pamh->env = env;