* Re: [Qemu-devel] [PATCH v2 5/6] qemu-bridge-helper: Fix fd leak in main()
[not found] ` <1401283300-14176-6-git-send-email-arei.gonglei@huawei.com>
@ 2014-06-04 8:15 ` Stefan Hajnoczi
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2014-06-04 8:15 UTC (permalink / raw)
To: arei.gonglei
Cc: kwolf, peter.crosthwaite, weidong.huang, stefanha, mst,
luonengjun, qemu-devel, armbru, qiaonuohan, av1474, kraxel,
aliguori, crobinso, pbonzini, lcapitulino, lersek, afaerber
On Wed, May 28, 2014 at 09:21:39PM +0800, arei.gonglei@huawei.com wrote:
> From: Gonglei <arei.gonglei@huawei.com>
>
> initialize fd and ctlfd, and close them at the end
>
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
> qemu-bridge-helper.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2 3/6] json-parser: Fix two coverity defects
[not found] ` <1401283300-14176-4-git-send-email-arei.gonglei@huawei.com>
@ 2014-06-09 20:15 ` Luiz Capitulino
2014-06-10 6:51 ` Gonglei (Arei)
0 siblings, 1 reply; 4+ messages in thread
From: Luiz Capitulino @ 2014-06-09 20:15 UTC (permalink / raw)
To: arei.gonglei
Cc: kwolf, ChenLiang, peter.crosthwaite, weidong.huang, aliguori, mst,
luonengjun, qemu-devel, armbru, qiaonuohan, av1474, kraxel,
stefanha, crobinso, pbonzini, lersek, afaerber
On Wed, 28 May 2014 21:21:37 +0800
<arei.gonglei@huawei.com> wrote:
> From: Gonglei <arei.gonglei@huawei.com>
>
> Pointer "token" returned by "parser_context_pop_token(ctxt)" is never used.
That's not true, "token" is used by token_is_operator(). The patch seems
correct to me, but you have to fix the changelog.
Also, who's going to take care of this series? I'm willing to cherry-pick
this patch...
>
> Signed-off-by: ChenLiang <chenliang88@huawei.com>
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
> qobject/json-parser.c | 15 ++-------------
> 1 file changed, 2 insertions(+), 13 deletions(-)
>
> diff --git a/qobject/json-parser.c b/qobject/json-parser.c
> index e46c264..4288267 100644
> --- a/qobject/json-parser.c
> +++ b/qobject/json-parser.c
> @@ -423,7 +423,6 @@ static QObject *parse_object(JSONParserContext *ctxt, va_list *ap)
> if (!token_is_operator(token, '{')) {
> goto out;
> }
> - token = NULL;
>
> dict = qdict_new();
>
> @@ -449,7 +448,6 @@ static QObject *parse_object(JSONParserContext *ctxt, va_list *ap)
> parse_error(ctxt, token, "expected separator in dict");
> goto out;
> }
> - token = NULL;
>
> if (parse_pair(ctxt, dict, ap) == -1) {
> goto out;
> @@ -461,10 +459,8 @@ static QObject *parse_object(JSONParserContext *ctxt, va_list *ap)
> goto out;
> }
> }
> - token = NULL;
> } else {
> - token = parser_context_pop_token(ctxt);
> - token = NULL;
> + (void)parser_context_pop_token(ctxt);
> }
>
> return QOBJECT(dict);
> @@ -487,10 +483,8 @@ static QObject *parse_array(JSONParserContext *ctxt, va_list *ap)
> }
>
> if (!token_is_operator(token, '[')) {
> - token = NULL;
> goto out;
> }
> - token = NULL;
>
> list = qlist_new();
>
> @@ -523,8 +517,6 @@ static QObject *parse_array(JSONParserContext *ctxt, va_list *ap)
> goto out;
> }
>
> - token = NULL;
> -
> obj = parse_value(ctxt, ap);
> if (obj == NULL) {
> parse_error(ctxt, token, "expecting value");
> @@ -539,11 +531,8 @@ static QObject *parse_array(JSONParserContext *ctxt, va_list *ap)
> goto out;
> }
> }
> -
> - token = NULL;
> } else {
> - token = parser_context_pop_token(ctxt);
> - token = NULL;
> + (void)parser_context_pop_token(ctxt);
> }
>
> return QOBJECT(list);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2 3/6] json-parser: Fix two coverity defects
2014-06-09 20:15 ` [Qemu-devel] [PATCH v2 3/6] json-parser: Fix two coverity defects Luiz Capitulino
@ 2014-06-10 6:51 ` Gonglei (Arei)
0 siblings, 0 replies; 4+ messages in thread
From: Gonglei (Arei) @ 2014-06-10 6:51 UTC (permalink / raw)
To: Luiz Capitulino
Cc: kwolf@redhat.com, chenliang (T), peter.crosthwaite@xilinx.com,
Huangweidong (C), aliguori@amazon.com, mst@redhat.com, Luonengjun,
qemu-devel@nongnu.org, armbru@redhat.com,
qiaonuohan@cn.fujitsu.com, av1474@comtv.ru, kraxel@redhat.com,
stefanha@redhat.com, crobinso@redhat.com, pbonzini@redhat.com,
lersek@redhat.com, afaerber@suse.de
> -----Original Message-----
> From: Luiz Capitulino [mailto:lcapitulino@redhat.com]
> Sent: Tuesday, June 10, 2014 4:16 AM
> To: Gonglei (Arei)
> Cc: qemu-devel@nongnu.org; av1474@comtv.ru; kraxel@redhat.com;
> lersek@redhat.com; qiaonuohan@cn.fujitsu.com; afaerber@suse.de;
> eblake@redhat.com; pbonzini@redhat.com; mst@redhat.com; Huangweidong
> (C); peter.crosthwaite@xilinx.com; kwolf@redhat.com; stefanha@redhat.com;
> crobinso@redhat.com; aliguori@amazon.com; armbru@redhat.com;
> Luonengjun; chenliang (T)
> Subject: Re: [PATCH v2 3/6] json-parser: Fix two coverity defects
>
> On Wed, 28 May 2014 21:21:37 +0800
> <arei.gonglei@huawei.com> wrote:
>
> > From: Gonglei <arei.gonglei@huawei.com>
> >
> > Pointer "token" returned by "parser_context_pop_token(ctxt)" is never used.
>
> That's not true, "token" is used by token_is_operator(). The patch seems
> correct to me, but you have to fix the changelog.
>
OK.
> Also, who's going to take care of this series? I'm willing to cherry-pick
> this patch...
>
Thanks. As this patch series, [PATCH 1/6] vnc-enc-tight... had been applied by Gerd,
the others haven't.
I will send v3 for other patches, hope to be applied, thanks!
Best regards,
-Gonglei
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2 2/6] vga: Fix divide-by-zero in vga_update_text
[not found] ` <1401283300-14176-3-git-send-email-arei.gonglei@huawei.com>
@ 2014-06-10 8:38 ` Gonglei (Arei)
0 siblings, 0 replies; 4+ messages in thread
From: Gonglei (Arei) @ 2014-06-10 8:38 UTC (permalink / raw)
To: Gonglei (Arei), qemu-devel@nongnu.org
Cc: Huangweidong (C), Luonengjun, kraxel@redhat.com
Hi, Gerd
What's your opinion about this patch? Thanks,
Best regards,
-Gonglei
> -----Original Message-----
> From: Gonglei (Arei)
> Sent: Wednesday, May 28, 2014 9:22 PM
> To: qemu-devel@nongnu.org
> Cc: av1474@comtv.ru; kraxel@redhat.com; lcapitulino@redhat.com;
> lersek@redhat.com; qiaonuohan@cn.fujitsu.com; afaerber@suse.de;
> eblake@redhat.com; pbonzini@redhat.com; mst@redhat.com; Huangweidong
> (C); peter.crosthwaite@xilinx.com; kwolf@redhat.com; stefanha@redhat.com;
> crobinso@redhat.com; aliguori@amazon.com; armbru@redhat.com;
> Luonengjun; Gonglei (Arei)
> Subject: [PATCH v2 2/6] vga: Fix divide-by-zero in vga_update_text
>
> From: Gonglei <arei.gonglei@huawei.com>
>
> Spotted by Coverity:
>
> (20) Event cond_true: Condition "cursor_visible", taking true branch
> (21) Event cond_true: Condition "cursor_offset < size", taking true branch
> (22) Event cond_true: Condition "cursor_offset >= 0", taking true branch
>
> 2097 if (cursor_visible && cursor_offset < size && cursor_offset >= 0)
> (23) Event divide_by_zero: In expression "cursor_offset / width",
> division by expression "width" which may be zero has undefined behavior.
>
> 2098 dpy_text_cursor(s->con,
> 2099 TEXTMODE_X(cursor_offset),
> 2100
> TEXTMODE_Y(cursor_offset));
>
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
> hw/display/vga.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/display/vga.c b/hw/display/vga.c
> index 8cd6afe..3c1c6eb 100644
> --- a/hw/display/vga.c
> +++ b/hw/display/vga.c
> @@ -2094,7 +2094,7 @@ static void vga_update_text(void *opaque,
> console_ch_t *chardata)
> s->cr[VGA_CRTC_CURSOR_START] != s->cursor_start ||
> s->cr[VGA_CRTC_CURSOR_END] != s->cursor_end ||
> full_update) {
> cursor_visible = !(s->cr[VGA_CRTC_CURSOR_START] & 0x20);
> - if (cursor_visible && cursor_offset < size && cursor_offset >=
> 0)
> + if (cursor_visible && cursor_offset < size && cursor_offset > 0)
> dpy_text_cursor(s->con,
> TEXTMODE_X(cursor_offset),
> TEXTMODE_Y(cursor_offset));
> --
> 1.7.12.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-10 8:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1401283300-14176-1-git-send-email-arei.gonglei@huawei.com>
[not found] ` <1401283300-14176-6-git-send-email-arei.gonglei@huawei.com>
2014-06-04 8:15 ` [Qemu-devel] [PATCH v2 5/6] qemu-bridge-helper: Fix fd leak in main() Stefan Hajnoczi
[not found] ` <1401283300-14176-4-git-send-email-arei.gonglei@huawei.com>
2014-06-09 20:15 ` [Qemu-devel] [PATCH v2 3/6] json-parser: Fix two coverity defects Luiz Capitulino
2014-06-10 6:51 ` Gonglei (Arei)
[not found] ` <1401283300-14176-3-git-send-email-arei.gonglei@huawei.com>
2014-06-10 8:38 ` [Qemu-devel] [PATCH v2 2/6] vga: Fix divide-by-zero in vga_update_text Gonglei (Arei)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).