Peter Wemm
e48f3cfbfc
Rework previous commit.. I was confused by the number of diffs in the PR
...
and forgot what I was trying to do originally and accidently zapped
a feature. :-] The problem is that we are converting a counted buffer in
a malloc pool into a null terminated C-style string. I was calling realloc
originally to shrink the buffer to the desired size. If realloc failed, we
still returned the valid buffer - the only thing wrong was it was a tad
too large. The previous commit disabled this.
This commit now handles the three cases..
1: the buffer is exactly right for the null byte to terminate the
string (we don't call realloc).
2: it's got h.left = 0, so we must expand it to make room. If realloc
fails here, it's fatal.
3: if there's too much room, we realloc to shrink it - a failed realloc
is not fatal, we use the original buffer which is still valid.
1997-07-06 08:42:37 +00:00
..
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1994-05-27 05:00:24 +00:00
1997-02-22 15:12:41 +00:00
1994-05-27 05:00:24 +00:00
1997-02-22 15:12:41 +00:00
1994-05-27 05:00:24 +00:00
1997-02-22 15:12:41 +00:00
1997-01-20 23:23:22 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1996-08-22 23:31:07 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1996-08-06 22:34:44 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1994-05-27 05:00:24 +00:00
1997-04-13 13:35:33 +00:00
1994-05-27 05:00:24 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-01-20 23:23:22 +00:00
1997-02-22 15:12:41 +00:00
1996-05-23 01:05:25 +00:00
1997-02-22 15:12:41 +00:00
1995-05-30 05:51:47 +00:00
1997-02-22 15:12:41 +00:00
1997-04-13 13:35:33 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-03-11 11:40:40 +00:00
1997-04-13 13:35:33 +00:00
1994-05-27 05:00:24 +00:00
1997-02-22 15:12:41 +00:00
1994-05-27 05:00:24 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-01-20 23:23:22 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1994-05-27 05:00:24 +00:00
1997-03-11 11:29:42 +00:00
1994-05-27 05:00:24 +00:00
1997-05-03 03:50:06 +00:00
1996-05-01 22:49:36 +00:00
1997-04-07 18:01:10 +00:00
1996-09-30 15:39:18 +00:00
1997-03-19 00:52:58 +00:00
1997-02-22 15:12:41 +00:00
1994-05-27 05:00:24 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1994-05-27 05:00:24 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1996-06-22 10:34:15 +00:00
1997-07-01 17:46:39 +00:00
1997-02-22 15:12:41 +00:00
1997-04-13 13:35:33 +00:00
1994-05-27 05:00:24 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-01-20 23:23:22 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1994-05-27 05:00:24 +00:00
1996-03-27 20:49:07 +00:00
1994-05-27 05:00:24 +00:00
1997-01-20 23:23:22 +00:00
1997-02-22 15:12:41 +00:00
1997-07-06 08:42:37 +00:00
1997-02-22 15:12:41 +00:00
1997-07-01 17:46:39 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00
1997-02-22 15:12:41 +00:00