Menu

pbInput.pas ReadString does not allow string of length = 0

2018-07-27
2018-07-31
  • Dennis Poon

    Dennis Poon - 2018-07-27

    I encountered problem with the following and made a suggestion:

    function TProtoBufInput.readString: AnsiString;
    var size: integer;
    begin
    size := readRawVarint32;
    Assert(size > 0, ProtoBufException + 'readString (size <= 0)'); //<--- sometimes, server will pass an empty string and it will cause exception. should change it to Size >= 0 instead.
    SetString(result, FBuffer + FPos, size);
    Inc(FPos, size);
    end;

    Seems, the author of this project won't respond to feeback anymore. This project seems dead!

     
  • Marat

    Marat - 2018-07-31

    Денис, спасибо за найденную ошибку, в ближайшее время постараюсь исправить эту проблему.
    Извини, не сильно часто просматриваю свою почту.
    С уважением, Марат

    Denis, thanks for the error found, in the near future I will try to fix this problem.
    Sorry, I do not often look at my mail.
    Sincerely, Marat

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.