summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r--usr.sbin/lpr/common_source/common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/lpr/common_source/common.c b/usr.sbin/lpr/common_source/common.c
index 9b87dfa..c9c276d 100644
--- a/usr.sbin/lpr/common_source/common.c
+++ b/usr.sbin/lpr/common_source/common.c
@@ -139,6 +139,8 @@ getq(const struct printer *pp, struct jobqueue *(*namelist[]))
* and dividing it by a multiple of the minimum size entry.
*/
arraysz = (stbuf.st_size / 24);
+ if (arraysz < 16)
+ arraysz = 16;
queue = (struct jobqueue **)malloc(arraysz * sizeof(struct jobqueue *));
if (queue == NULL)
goto errdone;
OpenPOWER on IntegriCloud