Skip to content

create CI for windows #190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 101 commits into
base: master
Choose a base branch
from
Open

Conversation

Kreijstal
Copy link

It compiles but it seems it crashes... need to figure out why

auppal and others added 30 commits June 9, 2021 06:15
The type `unsigned short`, which is the type of the LZW code, is much
larger than the max of an LZW code, causing a wild pointer.

That causes an array overflow. Long term, this library should jettison
this unnecessary GIF code, and use a better maintained library for it.
In the meantime, however, the issue is simple enough to solve, so I've
done so.

Resolves CVE-2020-19668.
Closes saitoha#136.
Closes libsixel#7.
In certain cases, a PNG could be fed into `load_png` which would act as
a DoS vector.

I fixed this in two ways:

* making sure `rows` is instantiated to NULL and checking if it's NULL
  before freeing it;
* the minimum length of PNG data is known to be 67 bytes. So, if it's
  less, we know we can error out.

Resolves CVE-2020-11721.
Closes saitoha/libpixel#134.
Closes libsixel#9.
…ges."

This reverts commit 622dc6c.

As I thought, removing bgindex is highly problematic. It doesn't allow
us to implement transparency, because it removes the color key that's
transparent. Fixing true color mode isn't worth that, it can be fixed
without it.
* Switch to Meson build system

* Remove more unnecessary "malloc_stub.h" files.

Obviously you need malloc.

* Deduplicate checked functions (were copied from Autotools)

Removes double check on `strerror` and `pow`.

* Fix GitHub Actions workflow

* Add libbsd-dev to GitHub Actions

* Add Python2 interpreter to GitHub Actions

* Use Meson Python module to find Python

* Remove non-existent pkg from GitHub Actions

* Fix headers, remove remnants of Autotools from them

* Add Bash scripts for tests derived from old Autotools config

* Make Meson install Python2 module when requested

* Add notes for Perl, PHP and Ruby modules.

* Document Meson build

* Sane ordering of summary string format args

* Generate and install pkg-config file (libsixel.pc)

* Disable Python module installation by default

Because it requires root.

* Update package.json
Another GNU Autotools remnant that should've been removed in libsixel#20.
Close libsixel#17. This should fix all the broken links @dankamongmen listed.
…ffuse-into-the-void

[error_diffuse] don't diffuse into the void
The only place sixel_encoder_prepare_palette() is called
from is sixel_encoder_encode_frame(). If we have a
SIXEL_FAILED result inside the former, we unref the palette,
potentially freeing it. We then goto the error path for
sixel_encoder_encode_frame(), where we unref it again, in a
classic double-free. Remove the internal unref. As noted,
this is a single call site, so removing the unref can't
cause a memory leak.

Closes libsixel#27, reported by a4865g ("WuLearn").
…er-free

sixel_encoder_prepare_palette: kill use-after-free
WSLUser and others added 28 commits October 10, 2021 18:04
Fixes the build yay.
Most people probably want a shared library, which is the meson default.
Some people want a static library, and this can be selected using
-Ddefault_library=static in which case a shared library will not be
built.

Anyone who *really* wants both can pass -Ddefault_library=both and get
their desire too.

All in all, this is better than hardcoding that choice here when it
doesn't really matter. (Also, this makes it easier for people using
libsixel as a wrap to select their preferences.)
This allows third-party consumers of libsixel which also use meson, to
add a subproject wrap and link to libsixel_dep the same way they can
link to dependency('libsixel').

Although generally using pkg-config and system libraries is preferred
meson subproject wraps can be used in fallback mode, and
dependency('libsixel') will first check for a system version, and then
if it cannot find one, it will check if a subproject defines one
instead, but the subproject version needs to also expose the correct
include directory using the declared dependency interface.
The purpose of pkg.generate() accepting a built library object as the
positional argument is so that it can infer how to correctly link to it.
Hence, -lsixel is already added from there. Adding it as a string to
`libraries: ` is redundant and produces incorrect results.
about half of the compilation checks were using
HAVE_LIBPNG, and the other half were using
HAVE_PNG. converge on HAVE_PNG, matching the
other declarations in config.h.
`libsixel` is moved to the community repository.
<https://archlinux.org/packages/community/x86_64/libsixel>

Signed-off-by: Orhun Parmaksız <[email protected]>
If libpng is disabled, stb is used to write the image. The header-only
implementation requires `STB_IMAGE_WRITE_IMPLEMENTATION` to be defined
to actually get an implementation of `stbi_write_png_to_mem()`
NULL-test input data before using it stbi__convert_format().

Tested:

```bash
wget https://github.com/libsixel/libsixel/files/7715065/stbi_1561_poc.zip
unzip stbi_1561_poc.zip

(meson setup --reconfigure -Dgd=disabled -Djpeg=disabled -Dpng=disabled -Dtests=enabled build ; ninja -C build)

build/converters/img2sixel ./stbi_1561_poc.bin
stb_image error
file too short (reading packets)
```

https://nvd.nist.gov/vuln/detail/CVE-2021-45340
Fixes: libsixel#73 libsixel#51
create a better CI, and allow compilation for windows
@Kreijstal
Copy link
Author

image
Nevermind, it DOES work, but only when using cat aka msys utility, that means while it can't print sixel, it can generate .sixel files.... fascinating

use pkgconf  correctly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.