diff options
author | des <des@FreeBSD.org> | 2002-04-02 20:57:22 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-04-02 20:57:22 +0000 |
commit | 7ca517bc656c2bf7403284f3b17155ffcae44089 (patch) | |
tree | 1cd961f26455c8d52e50872d7fd7194f9618f22b /contrib/openpam/lib | |
parent | 191bd7d163c8bb0d405b52eb41d1d91baaca3d1e (diff) | |
download | FreeBSD-src-7ca517bc656c2bf7403284f3b17155ffcae44089.zip FreeBSD-src-7ca517bc656c2bf7403284f3b17155ffcae44089.tar.gz |
Fix incorrect allocation size (perforce change 8918)
PR: bin/36658
Submitted by: Takanori Saneto <sanewo@ba2.so-net.ne.jp>
Diffstat (limited to 'contrib/openpam/lib')
-rw-r--r-- | contrib/openpam/lib/pam_putenv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/openpam/lib/pam_putenv.c b/contrib/openpam/lib/pam_putenv.c index 0d683cf..3dd996c 100644 --- a/contrib/openpam/lib/pam_putenv.c +++ b/contrib/openpam/lib/pam_putenv.c @@ -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; |