<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Crashed in Calc Macro (Basic)"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=111313#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Crashed in Calc Macro (Basic)"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=111313">bug 111313</a>
              from <span class="vcard"><a class="email" href="mailto:xiscofauli@libreoffice.org" title="Xisco FaulĂ­ <xiscofauli@libreoffice.org>"> <span class="fn">Xisco FaulĂ­</span></a>
</span></b>
        <pre>@Stephan, it seems this change avoids the crash:

--- a/sal/rtl/ustrbuf.cxx
+++ b/sal/rtl/ustrbuf.cxx
@@ -154,7 +154,7 @@ void SAL_CALL rtl_uStringbuffer_insert( rtl_uString **
This,
             if( len == 1 )
                 /* optimized for 1 character */
                 pBuf[offset] = *str;
-            else
+            else if( len > 1 )
                 memcpy( pBuf + offset, str, len * sizeof(sal_Unicode) );
         }
         (*This)->length = nOldLen + len;</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>