c0fc4d2122
The getline function does not return a pointer but the amount of read characters. The error return value to check for is -1. Set buf to NULL to avoid dereference of an uninitialized stack value. The getline function returns -1 if size argument is NULL. Always use a valid pointer even if size is unimportant. Signed-off-by: Samanta Navarro <ferivoz@riseup.net>