aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/driver.c b/driver.c
index 888dae4d..6cb18cd8 100644
--- a/driver.c
+++ b/driver.c
@@ -838,8 +838,12 @@ struct method *proto; /* protocol method table */
/* we may need to get sizes in order to check message limits */
msgsizes = (int *)NULL;
if (!ctl->fetchall && proto->getsizes && ctl->limit)
- if ((msgsizes = (proto->getsizes)(socket, count)) == (int *)NULL)
+ {
+ msgsizes = (int *)alloca(sizeof(int) * count);
+
+ if ((ok = (proto->getsizes)(socket, count, msgsizes)) != 0)
return(PS_ERROR);
+ }
if (check_only)
{