[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for v2.3.0] fw_cfg: add check to validate curren
From: |
P J P |
Subject: |
Re: [Qemu-devel] [PATCH for v2.3.0] fw_cfg: add check to validate current entry value |
Date: |
Wed, 6 Jan 2016 11:51:58 +0530 (IST) |
+-- On Tue, 5 Jan 2016, Stefan Weil wrote --+
| > - s->cur_offset < e->len) {
| > + if (s->cur_entry != FW_CFG_INVALID
| > + && s->cur_entry & FW_CFG_WRITE_CHANNEL
| > + && e->callback
| > + && s->cur_offset < e->len) {
|
| I suggest to test e != NULL instead of s->cur_entry != FW_CFG_INVALID.
|
| Of course both variants are equivalent, but e != NULL might be easier
| to review and make work of static code analyzers easier, too.
Yes, I've sent a revised patch with this change.
Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F