[Libwebsockets] minor logging bug in vhost.c: potential null string printed

Bram Peeters Bram.Peeters at dekimo.com
Mon Mar 29 13:34:38 CEST 2021


Hi,

I ran into a small logging bug  after adding a new mounting point for dynamic content:
At line 877 of the current git version you have:
while (mounts) {



(void)mount_protocols[0];



lwsl_info(" mounting %s%s to %s\n",



mount_protocols[mounts->origin_protocol],



mounts->origin, mounts->mountpoint);






mounts = mounts->mount_next;


}

Since mounts->origin can be NULL (at least it is that way in the minimal-http-server-dynamic.c I started from)  this will start printing a NULL pointer if you have info level enabled.

(not sure if you prefer to have git issues or check with you via this way first)

Regards,
Bram





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20210329/446af8f9/attachment.htm>


More information about the Libwebsockets mailing list