[Kde-games-devel] Review Request: Avoid a crash when knavalbattle receives a valid (but understood) xml message
Jaime Torres Amate
jtamate at gmail.com
Sun Dec 9 10:27:12 UTC 2012
> On Dec. 8, 2012, 3:30 p.m., Albert Astals Cid wrote:
> > Ship It!
>
> Albert Astals Cid wrote:
> Actually maybe it would make more sense not emmiting a null message from the protocol.cpp file instead of protecting from a null message in the networkentity.cpp slot? Anyway any of the two solutions work, commit the one you prefer :-)
In protocol.cpp, this is the "offending" message: return MessagePtr(); (after emit parseError("Unknown message type"); ).
I think it is easier to detect a NULL in networkentity.cpp than to create an special MessagePtr to handle this...
- Jaime Torres
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107554/#review23156
-----------------------------------------------------------
On Dec. 2, 2012, 9:51 a.m., Jaime Torres Amate wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107554/
> -----------------------------------------------------------
>
> (Updated Dec. 2, 2012, 9:51 a.m.)
>
>
> Review request for KDE Games.
>
>
> Description
> -------
>
> Avoid a crash when knavalbattle receives a valid (but understood) xml message.
> When the not understood message (for example, the one needed to enable/disable adjacent ships, for KDE SC 4.11) is received, msg is null.
>
>
> Diffs
> -----
>
> src/networkentity.cpp 3367389
>
> Diff: http://git.reviewboard.kde.org/r/107554/diff/
>
>
> Testing
> -------
>
> Does not crash, even when does not receives a non valid xml message.
>
>
> Thanks,
>
> Jaime Torres Amate
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20121209/064f344a/attachment.html>
More information about the kde-games-devel
mailing list