Hard crash when doing EncodeBase64

  1. 5 weeks ago

    Beatrix W

    Sep 16 Pre-Release Testers, Third Party Store Europe (Germany)
    Edited 5 weeks ago

    Got a couple of crash reports from a user. How can you screw up EncodeBase64???

    Thread 4 Crashed:
    0 libsystem_platform.dylib 0x00007fff5d3026f2 _platform_strlen + 18
    1 com.xojo.XojoFramework 0x000000010dc7132a StringOpsClassic::ConstructFromBuffer(char const*, unsigned int, int) + 28
    2 com.xojo.XojoFramework 0x000000010dc7f9fc string::ConstructFromBuffer(char const*, unsigned long, unsigned int) + 78
    3 com.xojo.XojoFramework 0x000000010dc55e32 REALBuildString(char const*, int) + 40
    4 InternetEncodings.dylib 0x00000001103659dc 0x110365000 + 2524
    5 com.mothsoftware.mailarchiverx 0x000000010a42c40a _InternalGlobals7.EncodeBase64%s%si8 + 58
    6 com.mothsoftware.mailarchiverx 0x000000010b13790d MimeAttachment.getHtmlPreview%s%o<MimeAttachment>b + 701
    7 com.mothsoftware.mailarchiverx 0x000000010b0f3525 MimeParser.parseChildPart%%o<MimeParser>o<MimeMailX> + 9269
    8 com.mothsoftware.mailarchiverx 0x000000010b0ed4e7 MimeParser.parseMixed%%o<MimeParser>o<MimeMailX> + 1031
    9 com.mothsoftware.mailarchiverx 0x000000010b0e9401 MimeParser.parseMime%%o<MimeParser>o<MimeMailX> + 849
    10 com.mothsoftware.mailarchiverx 0x000000010b0eac54 MimeParser.parseAlternative%%o<MimeParser>o<MimeMailX> + 2676
    11 com.mothsoftware.mailarchiverx 0x000000010b0e930c MimeParser.parseMime%%o<MimeParser>o<MimeMailX> + 604
    12 com.mothsoftware.mailarchiverx 0x000000010b0e67cd MimeParser.execute%%o<MimeParser> + 2669
    13 com.mothsoftware.mailarchiverx 0x000000010b0e577c MimeParser.Constructor%%o<MimeParser>sbA1o<FolderItem> + 940
    14 com.mothsoftware.mailarchiverx 0x000000010bab064d MailParser.parse%i8%o<MailParser> + 8717
    15 com.mothsoftware.mailarchiverx 0x000000010bb91cd2 ArchiveThread.Archive%%o<ArchiveThread> + 17970
    16 com.mothsoftware.mailarchiverx 0x000000010bb89265 ArchiveThread.Event_Run%%o<ArchiveThread> + 117
    17 com.xojo.XojoFramework 0x000000010ddc6008 0x10db5d000 + 2527240
    18 com.xojo.XojoFramework 0x000000010dc85fbb 0x10db5d000 + 1216443
    19 libsystem_pthread.dylib 0x00007fff5d30e2eb _pthread_body + 126
    20 libsystem_pthread.dylib 0x00007fff5d311249 _pthread_start + 66
    21 libsystem_pthread.dylib 0x00007fff5d30d40d thread_start + 13

    Does anyone have an idea what might cause this? Going to try MBS first.

    Xojo 2019r1.1, 10.14.6.

  2. Sam R

    Sep 16 Pre-Release Testers, Xojo Pro, Third Party Store Hengchun, Pingtung, Taiwan

    Are you sure that there's valid text being passed to encodeBase64?

  3. Beatrix W

    Sep 16 Pre-Release Testers, Third Party Store Europe (Germany)

    I'm parsing emails. Who knows what sort of special data is in there?

  4. Kevin G

    Sep 17 Pre-Release Testers, Xojo Pro Gatesheed, England

    Out of memory?

  5. Beatrix W

    Sep 17 Pre-Release Testers, Third Party Store Europe (Germany)

    In 64bit? The user would have noticed that because for 64bit that kills the complete computer.

  6. Rick A

    Sep 17 Pre-Release Testers (Brazil. GMT-3:00)

    @Kevin G Out of memory?

    Looks like

    StringOpsClassic::ConstructFromBuffer(char const*, unsigned int, int)
  7. Kem T

    Sep 17 Pre-Release Testers, Xojo Pro, XDC Speakers Connecticut

    @Sam R Are you sure that there's valid text being passed to encodeBase64?

    It works on bytes, not text, so it shouldn't care.

  8. Kevin G

    Sep 17 Pre-Release Testers, Xojo Pro Gatesheed, England

    @Beatrix W In 64bit? The user would have noticed that because for 64bit that kills the complete computer.

    ah - you didn't say that your app was 64 bit (-:

    Maybe some part of EncodeBase64 is not 64 bit clean and a ptr / length variable has overflowed 32 bits.

or Sign Up to reply!