[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup
From: |
P J P |
Subject: |
Re: [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup_printf calls |
Date: |
Wed, 24 Jul 2019 11:18:09 +0530 (IST) |
+-- On Tue, 23 Jul 2019, Li Qiang wrote --+
| Stefan Hajnoczi <address@hidden> 于2019年7月23日周二 下午9:03写道:
| > On Tue, Jul 23, 2019 at 04:17:54PM +0530, P J P wrote:
| > > - snprintf(helper_cmd, sizeof(helper_cmd), "%s %s %s %s",
| > > - helper, "--use-vnet", fd_buf, br_buf);
| > > + helper_cmd = g_strdup_printf("%s %s %s %s", helper,
| > > + "--use-vnet", fd_buf, br_buf ? br_buf : "");
| >
| > The change to the br_buf argument isn't covered in the commit
| > description. Why did you change this, was it a bug, etc?
|
| IIUC, if we pass the NULL argument in g_strdup_printf, the 'helper_cmd' will
| contain the '(null)' char.
Yep, right.
| Reviewed-by: Li Qiang <address@hidden>
Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F
- Re: [Qemu-devel] [PATCH v4 1/3] qemu-bridge-helper: restrict interface name to IFNAMSIZ, (continued)
- [Qemu-devel] [PATCH v4 2/3] qemu-bridge-helper: move repeating code in parse_acl_file, P J P, 2019/07/23
- [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup_printf calls, P J P, 2019/07/23
- Re: [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup_printf calls, Stefan Hajnoczi, 2019/07/23
- Re: [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup_printf calls, Li Qiang, 2019/07/23
- Re: [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup_printf calls,
P J P <=
- Re: [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup_printf calls, Stefan Hajnoczi, 2019/07/29
- Re: [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup_printf calls, Jason Wang, 2019/07/31
- Re: [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup_printf calls, P J P, 2019/07/31
- Re: [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup_printf calls, Jason Wang, 2019/07/31
- Re: [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup_printf calls, P J P, 2019/07/31
Re: [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup_printf calls, Daniel P . Berrangé, 2019/07/23
Re: [Qemu-devel] [PATCH v4 0/3] restrict bridge interface name to IFNAMSIZ, no-reply, 2019/07/23
Re: [Qemu-devel] [PATCH v4 0/3] restrict bridge interface name to IFNAMSIZ, Jason Wang, 2019/07/26