qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 1/3] qemu-bridge-helper: restrict interface n


From: P J P
Subject: Re: [Qemu-devel] [PATCH v2 1/3] qemu-bridge-helper: restrict interface name to IFNAMSIZ
Date: Mon, 1 Jul 2019 15:28:30 +0530 (IST)

+-- On Mon, 1 Jul 2019, Daniel P. Berrangé wrote --+
| > +        if (strcmp(cmd, "include") && strlen(arg) >= IFNAMSIZ) {
| > +            fprintf(stderr, "name `%s' too long: %lu\n", arg, strlen(arg));
| 
| strlen returns size_t, which does not match %lu - it needs %zu - we can
| ignore the non-portability of %zu to windows, since this code is UNIX
| only.
| 
| I'd prefer also !g_str_equal(cmd, "include")  as to me it reads more
| easily.

Okay. Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F


reply via email to

[Prev in Thread] Current Thread [Next in Thread]