Giter VIP home page Giter VIP logo

bcomp's Introduction

Hi there ๐Ÿ‘‹

  • ๐Ÿ”ญ Iโ€™m currently working on Cloud High-Performance Computing
  • ๐ŸŒฑ Iโ€™m currently learning cloud infrastructure-as-code
  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on the project HPC-NOW
  • ๐Ÿค” Iโ€™m looking for help with developing the project HPC-NOW
  • ๐Ÿ“ซ How to reach me: [email protected]
  • โšก Fun fact: I sometimes write bugs :)

bcomp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bcomp's Issues

Cannot decompress data compressed by this tool.

Steps to reproduce:

$ ./bcomp -c data_a.dat data_b.dat
INFO: Compressed file data_a.dat to data_b.dat.bc . Return Value: 0.
Repository: https://github.com/zhenrong-wang/bcomp
$ ./bcomp -d data_b.dat.bc data_c.dat
INFO: Decompressed file data_b.dat.bc to data_c.dat .
Repository: https://github.com/zhenrong-wang/bcomp

data_a.zip

Decompressing random file fails with buffer overflow.

Create file with length of 4 bytes: 0xff, 0xff, 0x00, 0x00 and try to decompress it. Result is stack buffer overflow accessing variable dict_elem_size, it uses index 3 and index 3. But the array has size only of [4][3] elements.

After compressing single-byte length file, it fails to decompress it.

Steps to reproduce:

$ gcc bcomp.c -o bcomp
$ echo -n 2 > data_a.dat
$ md5sum data_a.dat
c81e728d9d4c2f636f067f89cc14862c *data_a.dat
$ ./bcomp.exe -c data_a.dat data_b.dat
INFO: Compressed file data_a.dat to data_b.dat.bc . Return Val: 0.
Repository: https://github.com/zhenrong-wang/bcomp
$ ./bcomp.exe -d data_b.dat.bc data_c.dat
INFO: Decompressed file data_b.dat.bc to data_c.dat . Return Val: 0.
Repository: https://github.com/zhenrong-wang/bcomp
$ md5sum data_c.dat
2df02d17bb56e32a8c4515a196e2b5cd *data_c.dat

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.