angler-fishThe Vulnerability History Project

coredump: do not try to access unitialized CONTEXT_COMM field

      Most of the fields in the context array come from the kernel (passed
through argv), but two are special: comm and exe. We allocate them
ourselves. We forgot to initialize context[CONTEXT_COMM] with the value
we allocated (introduced in 9aa820231414baa28e6bf02a033932cb69ff6b8b).
To simplify things, just set context[CONTEXT_COMM] and context[CONTEXT_EXE],
and free those two fields at the end.

Fixes #5442.
    
commit ea5cc2a8f65535a9b3f8ba39a8df13a0c770f41d
+37 -53
expand_less