Blender Git Loki

Git Commits -> Revision 9cac158

Revision 9cac158 by Bastien Montagne (master)
July 30, 2020, 12:26 (GMT)
Fix T78730: CLOG writes/reads outside allocated memory.

Fix several issues in CLOG code:
* In `clg_str_reserve`, allocated memory may be bigger than requested
one, do not assign the latter back to `cstr->len_alloc`.
* `clg_str_vappendf` was mis-interpreting returned value from
`vsnprintf`, and completely mixing total allocated memory and extra
needed amount of memory to allocate...

Simplified code of `clg_str_vappendf` to only have allocating code
handled in one place, makes things easier to follow too.

Think this should also be beckported to 2.83.

Commit Details:

Full Hash: 9cac158e962f1da656edbd92a951444e012e2a08
Parent Commit: 4251a87
Lines Changed: +18, -11

1 Modified Path:

/intern/clog/clog.c (+18, -11) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021