Subject: bug in expand allocation

From: [email-masked] (Albrecht Kadlec)
Date: Tue, 10 Sep 96 15:43:53 +0200

try adding this lines to the very end of the expand function in complex.c

if (j!=l2)
fprintf(stderr,"ERROR: expand failed: %d != %d %d:%s\n",l2,j,strlen(out),out);

and look at the log.
l2= allocated length,
strlen(out) should be equal to j = actual length
out is the expanded string.
it's no tragedy since in most cases, too much is allocated (4 to 12 char's).

this comes from change-anomalies:
the two while-if-trees should be identical, but they aren't.

found these while hacking up some things.
can't submit a proper patch, since I've mangled too much while hacking.

albrecht
-- 
The more I see the more I hear the more I find the fewer answers
I close my mind, I shut it out but you know its getting harder
to calm down, to reason out, to come to terms with
what it's all about					-- Marillion
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked] (Albrecht Kadlec)
Date: Tue, 10 Sep 96 18:05:49 +0200

>>>>> albrecht  writes:

A> try adding this lines to the very end of the expand function in complex.c

A> if (j!=l2)
A> fprintf(stderr,"ERROR: expand failed: %d != %d %d:%s\n",l2,j,strlen(out),out);

A> and look at the log.
A> l2= allocated length,
A> strlen(out) should be equal to j = actual length
A> out is the expanded string.
A> it's no tragedy since in most cases, too much is allocated (4 to 12 char's).
                            ^^^^
not entirely correct: in ALL cases.
l2 is an upper bound to the length, and that's ok to make it speedy.

sorry, I posted too early,
albrecht
-- 
What is history but a fable we have all agreed upon ? -- Napoleon
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].