summaryrefslogtreecommitdiff
path: root/appl/lib/debug.b
diff options
context:
space:
mode:
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);