Dan Kenigsberg has submitted this change and it was merged. Change subject: stomp: Make sure the \0 is read before slicing the buffer ......................................................................
stomp: Make sure the \0 is read before slicing the buffer In python if you try and slice past the end of the list\string you get an empty string and not an IndexError The original code check that we got all the data and sliced past the ending \0. But on rare cases where the message ended exactly with all the content but the \0 was not received. The slicing code would silently ignore the fact that the index doesn't exist and would return an empty string and switch the parser state making all future data have the wrong offset. This in turn made the command '\0SEND' instead of 'SEND' which has no handler and where silently ignored. The only way to solve this was to reconnect. Change-Id: Ib6d7d25719f814b97ebd2cc4c33ff25dc32e1357 Bug-Url: http://bugzilla.redhat.com/1181233 Signed-off-by: Saggi Mizrahi <[email protected]> Reviewed-on: http://gerrit.ovirt.org/37018 Reviewed-by: Yaniv Bronhaim <[email protected]> Reviewed-by: Dan Kenigsberg <[email protected]> --- M lib/yajsonrpc/stomp.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Yaniv Bronhaim: Looks good to me, but someone else must approve Saggi Mizrahi: Verified Dan Kenigsberg: Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/37018 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib6d7d25719f814b97ebd2cc4c33ff25dc32e1357 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Saggi Mizrahi <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
