nullkey/glc — pull request #62 by lano1106 (2013-12-12 05:13:31+00:00)
Title:  Fix buffer overflow causing heap corruption

in src/hook/alsa.c: Is allocating len bytes for device name contained
in '-a' option values. Last char index is len-1 and code NULL terminate
the string one byte after the end of the array.

I have documented the possible effect of the buffer overflow here:
http://blog.olivierlanglois.net/index.php/2013/12/11/deadlock_when_using_glc

Micro optimization: I have replaced malloc+memset combo with calloc:
Rationale documented here:
http://blog.olivierlanglois.net/index.php/2013/12/11/malloc_memset_vs_calloc_which_is_better

in src/glc/common/log.c: Make log file stream line buffered (like stderr) to see traces
as they happen.