blob: c598bb4319e6e9d36f341094d48ffdf258663c62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
$NetBSD: patch-ci,v 1.1 2006/09/13 12:27:26 joerg Exp $
Fixes for CVE-2006-2006-3739 and CVE-2006-3740.
--- lib/font/Type1/util.c.orig 2006-09-13 14:22:13.000000000 +0200
+++ lib/font/Type1/util.c
@@ -104,7 +104,7 @@ vm_alloc(int bytes)
bytes = (bytes + 7) & ~7;
/* Allocate the space, if it is available */
- if (bytes <= vm_free) {
+ if (bytes > 0 && bytes <= vm_free) {
answer = vm_next;
vm_free -= bytes;
vm_next += bytes;
|