[PATCH 04/19] log: Print truncated messages

Ian Jackson ijackson at chiark.greenend.org.uk
Thu Jun 21 18:04:32 BST 2012


Ian Jackson writes ("[PATCH 04/19] log: Print truncated messages"):
> If a message doesn't survive the vsnprintf in vMessage untruncated,
...
>  	vsnprintf(buff+bp,MESSAGE_BUFLEN-bp,message,args);
> +	buff[sizeof(buff)-2] = '\n';
> +	buff[sizeof(buff)-1] = '\0';
>  	/* Each line is sent separately */

I should have changed these sizeofs to MESSAGE_BUFLENs.

Ian.



More information about the sgo-software-discuss mailing list