Blender Git Loki

Git Commits -> Revision 4a08939

August 12, 2020, 07:01 (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: 4a08939e12bef34a7e01713e7db289792ba410c7
Parent Commit: a71490c
Committed By: Jeroen Bakker
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