Mike Lambert wrote:

> Unfortunately, I fail to see why this actually fixes any bug. 
> string_grow should unmake_COW itself. 

The problem is that unmake_COW will always resize the allocation down
to bufused (plus the padding added by mem_allocate). This means that
the buflen test could pass, and hence string_grow not be called, but then
unmake_COW could shrink the destination buffer before the memcopy
happens.

-- 
Peter Gibbs
EmKel Systems


Reply via email to