From 826972481bd5b858c29ebf34c1939832f5d5d4c9 Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Thu, 22 May 2008 18:57:24 +0000 Subject: 20080522-1956 --- appl/lib/debug.b | 3 +++ 1 file changed, 3 insertions(+) (limited to 'appl/lib/debug.b') 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); -- cgit v1.2.3