Skip to content
Snippets Groups Projects
  • Henrik (Grubba) Grubbström's avatar
    7fb7d686
    Revert "Store new malloced value instead." · 7fb7d686
    Henrik (Grubba) Grubbström authored
    This reverts commit a9693064.
    
    As mentioned in [LysLysKOM 20949405] (which probably hasn't been
    exported correctly to the mailinglist yet):
    
    The old code looks correct to me.
    
      * Restore s->s->len to the value it had when s->s was allocated
        (aka s->malloced).
    
      * Reallocate s->s with the new (now known) final length.
    
    The question does however arise whether the code is correct on
    realloc failure.
    7fb7d686
    History
    Revert "Store new malloced value instead."
    Henrik (Grubba) Grubbström authored
    This reverts commit a9693064.
    
    As mentioned in [LysLysKOM 20949405] (which probably hasn't been
    exported correctly to the mailinglist yet):
    
    The old code looks correct to me.
    
      * Restore s->s->len to the value it had when s->s was allocated
        (aka s->malloced).
    
      * Reallocate s->s with the new (now known) final length.
    
    The question does however arise whether the code is correct on
    realloc failure.