<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hallo Berthold,</p>
    <p>On March 14th you introduced a PR entitled  <a title="Cleanup:
        fix "unsave" snprintf()s in plannernotes.c
        The planner notes were constructed using a sequence of len +=
        snprintf(buf, buflen - len, ...);
        calls. This will fail once len > buflen, because the second
        parameter
        of snprintf is unsigned. Note that snprintf returns the number
        of
        bytes that would have been written if it weren't truncated.
        Fix this by using membuffer with put_format()/put_string() and
        asprintf_loc().
        Fixes #1155.
        Signed-off-by: Berthold Stoeger
        <bstoeger@mail.tuwien.ac.at>" class="message"
        data-pjax="true"
href="https://github.com/Subsurface-divelog/subsurface/commit/a4834e198d55d50a44d6f80e2137777b64652ce7#diff-0df10959bbcbe5342528360ce6f541a5">Cleanup:
        fix "unsave" snprintf()s in plannernotes.c</a> for Subsurface.</p>
    <p>This PR affected the function  add_icd_entry() in plannernotes.c.
      The changes, unfortunately, introduced a bug in the display of the
      icd data for a dive. I include a sample dive plan so that you can
      see the effect of this change in code. Activate the display of icd
      data in Preferences, open the attached dive plan and edit the dive
      plan within the planner. You will see random information being
      added to the icd data. In fact the icd data are quite messed up
      because the table should include two lines of gas change
      information. At least part of the problem lies in lines 55-68 of
      plannernotes.c.<br>
    </p>
    <p>I spent a bit of time trying to track down the problem, but it
      appears to be a pointer that writes to a buffer where it should
      not write to.</p>
    <p>Would you be prepared at all to look at this issue?</p>
    <p>Kind regards,</p>
    <p>willem</p>
    <p><br>
    </p>
    <p><br>
    </p>
  </body>
</html>

<br>
<div style="font-family:Arial,Helvetica,sans-serif"><span style="font-size:10.0pt;line-height:105%;font-family:"Segoe UI",sans-serif">This message and attachments are subject to a disclaimer.<br>
Please refer to <a href="http://upnet.up.ac.za/services/it/documentation/docs/004167.pdf" target="_blank">http://upnet.up.ac.za/<wbr>services/it/documentation/<wbr>docs/004167.pdf</a> </span><span style="font-size:10pt;line-height:105%;font-family:Tahoma,sans-serif">for
full details.</span></div>