On Tue, Aug 20, 2013 at 12:18:10AM -0400, Lidza Louina wrote:
> This patch fixes a warning associated with assigining
> a pointer in the dgnc_mbuf function.
>
> Signed-off-by: Lidza Louina <[email protected]>
> ---
> drivers/staging/dgnc/dgnc_driver.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/dgnc/dgnc_driver.c
> b/drivers/staging/dgnc/dgnc_driver.c
> index e8de7a4..c46c0e3 100644
> --- a/drivers/staging/dgnc/dgnc_driver.c
> +++ b/drivers/staging/dgnc/dgnc_driver.c
> @@ -943,7 +943,7 @@ static void dgnc_mbuf(struct board_t *brd, const char
> *fmt, ...) {
>
> memcpy(brd->msgbuf, buf, strlen(buf));
> brd->msgbuf += strlen(buf);
> - *brd->msgbuf = (char) NULL;
> + brd->msgbuf = (char *) NULL;
This isn't correct and will cause a NULL dereference bug. It should
be
*brd->msgbuf = '\0';
Btw, could you include the warning message in the changelog.
regards,
dan carpenter
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel