summaryrefslogtreecommitdiff
path: root/appl/lib/debug.b
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2008-05-22 18:57:24 +0000
committerCharles.Forsyth <devnull@localhost>2008-05-22 18:57:24 +0000
commit826972481bd5b858c29ebf34c1939832f5d5d4c9 (patch)
treeb9a26864ba510d4940783508128e239f84b7ed6f /appl/lib/debug.b
parentbf712df18834247f080a60fd5646d40b7cc5ae8b (diff)
20080522-1956
Diffstat (limited to 'appl/lib/debug.b')
-rw-r--r--appl/lib/debug.b3
1 files changed, 3 insertions, 0 deletions
diff --git a/appl/lib/debug.b b/appl/lib/debug.b
index 5e479274..44d77100 100644
--- a/appl/lib/debug.b
+++ b/appl/lib/debug.b
@@ -921,6 +921,9 @@ pstring(p: ref Prog, a: int): (int, string, string)
(n, s, err) = pstring0(p, a, m);
if(err != "" || n <= len s)
break;
+ # guard against broken devprog
+ if(m >= 3 * n)
+ return (-1, nil, "bad string");
m *= 2;
}
return (n, s, err);