[Gambas-bugtracker] Bug #1629: segmentation fault with gb.uncompress

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Thu Jul 25 20:43:13 CEST 2019


http://gambaswiki.org/bugtracker/edit?object=BUG.1629&from=L21haW4-

Gen BRAGA reported a new bug.

Summary
-------

segmentation fault with gb.uncompress

Type             : Bug
Priority         : Medium
Gambas version   : Master
Product          : Development Environment


Description
-----------

When using gb.compress.zlib sometimes I got a segmentation fault when uncompressing a string, using code below.

Attached the backtrace.

Public Function Descomprime(Mensagem As String, Optional Algoritmo As String) As String
  Dim zip As New Uncompress
  If _Debug Then Debug "Descomprimindo..."
  Dim sBuffer As String

  If IsMissing(Algoritmo) Then zip.Type = "zlib" Else zip.Type = Algoritmo

  Print "Tamanho da mensagem compactada = ", Mensagem.Len

  Try sBuffer = zip.String(Mensagem)

  If Error Then
    If _Debug Then Debug "Erro de descompressão... Mensagem comprimida? Processando mensagem sem compressão." 
    sBuffer = Mensagem
  Endif

  Return sBuffer
End

-
Regards


System information
------------------

[System]
Gambas=3.13.90 6c79771 (master)
OperatingSystem=Linux
Kernel=4.4.0-154-generic
Architecture=x86_64
Distribution=Ubuntu 16.04.6 LTS
Desktop=UNITY
Theme=Gtk
Language=pt_BR.UTF-8
Memory=7896M

[Libraries]
Cairo=libcairo.so.2.11400.6
Curl=libcurl.so.4.4.0
DBus=libdbus-1.so.3.14.6
GStreamer=libgstreamer-1.0.so.0.803.0
GTK+2=libgtk-x11-2.0.so.0.2400.30
GTK+3=libgtk-3.so.0.1800.9
OpenGL=libGL.so.1.2.0
OpenGL=libGL.so.1.7.0
Poppler=libpoppler.so.58.0.0
QT4=libQtCore.so.4.8.7
QT5=libQt5Core.so.5.5.1
SDL=libSDL-1.2.so.0.11.4
SQLite=libsqlite3.so.0.8.6




More information about the Bugtracker mailing list