Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package hexedit for openSUSE:Factory checked in at 2022-05-19 22:49:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/hexedit (Old) and /work/SRC/openSUSE:Factory/.hexedit.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hexedit" Thu May 19 22:49:12 2022 rev:2 rq:977948 version:1.6 Changes: -------- --- /work/SRC/openSUSE:Factory/hexedit/hexedit.changes 2020-11-15 15:27:27.819520304 +0100 +++ /work/SRC/openSUSE:Factory/.hexedit.new.1538/hexedit.changes 2022-05-19 22:49:22.058338551 +0200 @@ -1,0 +2,13 @@ +Wed May 18 13:18:13 UTC 2022 - Dominique Leuenberger <[email protected]> + +- Update to version 1.6: + + configure script must error-out when (n)curses isn't found + + Move SIGWINCH handling from handler to NCURSES + + Make configure.ac compliant with autoconf >= 2.70 + + Check that malloc did not return NULL + + Fix a possible memory leak in findFile() + + Prevent division by zero on empty files. +- Drop hexedit-Prevent-division-by-zero-on-empty-files.patch: fixed + upstream. + +------------------------------------------------------------------- Old: ---- hexedit-1.5.tar.gz hexedit-Prevent-division-by-zero-on-empty-files.patch New: ---- hexedit-1.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hexedit.spec ++++++ --- /var/tmp/diff_new_pack.PRRGDG/_old 2022-05-19 22:49:22.578339218 +0200 +++ /var/tmp/diff_new_pack.PRRGDG/_new 2022-05-19 22:49:22.582339223 +0200 @@ -1,7 +1,7 @@ # # spec file for package hexedit # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,14 +17,13 @@ Name: hexedit -Version: 1.5 +Version: 1.6 Release: 0 Summary: Hexadecimal editor for binary files License: GPL-2.0-or-later Group: Development/Tools/Editor URL: https://github.com/pixel/hexedit Source0: https://github.com/pixel/hexedit/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz -Patch1: hexedit-Prevent-division-by-zero-on-empty-files.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: pkgconfig ++++++ hexedit-1.5.tar.gz -> hexedit-1.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hexedit-1.5/.github/workflows/full-check.yml new/hexedit-1.6/.github/workflows/full-check.yml --- old/hexedit-1.5/.github/workflows/full-check.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/hexedit-1.6/.github/workflows/full-check.yml 2022-04-22 10:06:10.000000000 +0200 @@ -0,0 +1,27 @@ +name: full-check + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: install_dependencies + run: sudo apt install libncurses5-dev + - name: first_build + run: | + ./autogen.sh + ./configure + make + sudo make install +# sudo make uninstall +# make distclean +# - name: second_build_to_test_build_twice +# run: | +# ./autogen.sh +# ./configure +# make +# sudo make install diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hexedit-1.5/Changes new/hexedit-1.6/Changes --- old/hexedit-1.5/Changes 2020-08-28 11:51:07.000000000 +0200 +++ new/hexedit-1.6/Changes 2022-04-22 10:06:10.000000000 +0200 @@ -1,3 +1,12 @@ +april 2022 + - 1.6 + - configure script must error-out when (n)curses isn't found + - Move SIGWINCH handling from handler to NCURSES + - Make configure.ac compliant with autoconf >= 2.70 + - Check that malloc did not return NULL + - Fix a possible memory leak in findFile() + - Prevent division by zero on empty files. + august 2020 - 1.5 - Fix searching very long string diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hexedit-1.5/Makefile-build.in new/hexedit-1.6/Makefile-build.in --- old/hexedit-1.5/Makefile-build.in 2020-08-28 11:51:07.000000000 +0200 +++ new/hexedit-1.6/Makefile-build.in 2022-04-22 10:06:10.000000000 +0200 @@ -19,7 +19,7 @@ HTMLSITE = $(PRODUCT)-html-site.tar HTMLFILES = $(PRODUCT).html TMPFILES = $(DYNAMICBIN) $(TARSOURCE) $(HTMLFILES) -FROMINFILES = hexedit-$(VERSION).lsm hexedit.1 +FROMINFILES = hexedit.1 dynamic: $(MAKE) $(PRODUCT) @@ -36,9 +36,6 @@ docs: man2html $(PRODUCT).1 -hexedit-$(VERSION).lsm: hexedit.lsm.in - m4 -DVERSION=$(VERSION) $< > $@ - hexedit.1: hexedit.1.in m4 -DVERSION=$(VERSION) $< > $@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hexedit-1.5/configure.ac new/hexedit-1.6/configure.ac --- old/hexedit-1.5/configure.ac 2020-08-28 11:51:07.000000000 +0200 +++ new/hexedit-1.6/configure.ac 2022-04-22 10:06:10.000000000 +0200 @@ -3,18 +3,19 @@ dnl Process this file with autoconf to produce a configure script. dnl -AC_PREREQ(2.50) +AC_PREREQ([2.69]) -AC_INIT(hexedit.c) +AC_INIT +AC_CONFIG_SRCDIR([hexedit.c]) AC_CONFIG_HEADERS(config.h) -define(TheVERSION, 1.5) +define(TheVERSION, 1.6) PRODUCT=hexedit VERSION=TheVERSION INCL=hexedit.h SRCS="hexedit.c display.c mark.c page.c file.c interact.c misc.c search.c" -OTHER="COPYING Changes TODO install-sh configure config.h.in hexedit.1 hexedit-TheVERSION.lsm Makefile.in configure.in Makefile-build.in" +OTHER="COPYING Changes TODO install-sh configure config.h.in hexedit.1 hexedit-TheVERSION.lsm Makefile.in configure.ac Makefile-build.in" AC_SUBST(PRODUCT) AC_SUBST(VERSION) AC_SUBST(INCL) @@ -35,7 +36,8 @@ dnl Checks for libraries. AC_CHECK_LIB(curses, initscr, LIBS="$LIBS -lcurses", - [AC_CHECK_LIB(ncurses, initscr, LIBS="$LIBS -lncurses")] + [AC_CHECK_LIB(ncurses, initscr, LIBS="$LIBS -lncurses", + AC_MSG_ERROR([libcurses/libncurses not found.]))] ) AC_CHECK_LIB(tinfo, keypad, LIBS="$LIBS -ltinfo") AC_CHECK_FUNC(use_default_colors, @@ -48,7 +50,7 @@ AC_SYS_LARGEFILE dnl Checks for header files. -AC_HEADER_STDC +AC_PROG_EGREP AC_HEADER_STAT AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h unistd.h libgen.h sys/mount.h) @@ -72,4 +74,5 @@ #endif ) -AC_OUTPUT(Makefile Makefile-build hexedit.1) +AC_CONFIG_FILES([Makefile Makefile-build hexedit.1]) +AC_OUTPUT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hexedit-1.5/display.c new/hexedit-1.6/display.c --- old/hexedit-1.5/display.c 2020-08-28 11:51:07.000000000 +0200 +++ new/hexedit-1.6/display.c 2022-04-22 10:06:10.000000000 +0200 @@ -100,30 +100,12 @@ /*******************************************************************************/ /* Curses functions */ /*******************************************************************************/ -static void handleSigWinch(int sig) -{ - /*Close and refresh window to get new size*/ - endwin(); - refresh(); - - /*Reset to trigger recalculation*/ - lineLength = 0; - - clear(); - initDisplay(); - readFile(); - display(); -} void initCurses(void) { struct sigaction sa; initscr(); - memset(&sa, 0, sizeof(struct sigaction)); - sa.sa_handler = handleSigWinch; - sigaction(SIGWINCH, &sa, NULL); - #ifdef HAVE_COLORS if (colored) { start_color(); @@ -182,6 +164,7 @@ void display(void) { + long long fsize; int i; for (i = 0; i < nbBytes; i += lineLength) { @@ -204,8 +187,9 @@ else if (edited) i = '*'; else i = '-'; printw("-%c%c %s --0x%llX", i, i, baseName, (long long) base + cursor); - if (MAX(fileSize, lastEditedLoc)) printw("/0x%llX", (long long) getfilesize()); - printw("--%i%%", 100 * (base + cursor + getfilesize()/200) / getfilesize() ); + fsize = getfilesize(); + if (MAX(fileSize, lastEditedLoc)) printw("/0x%llX", fsize); + printw("--%i%%", fsize == 0 ? 0 : 100 * (base + cursor + fsize/200) / fsize ); if (mode == bySector) printw("--sector %lld", (long long) ((base + cursor) / SECTOR_SIZE)); move(cursor / lineLength, computeCursorXCurrentPos()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hexedit-1.5/file.c new/hexedit-1.6/file.c --- old/hexedit-1.5/file.c 2020-08-28 11:51:07.000000000 +0200 +++ new/hexedit-1.6/file.c 2022-04-22 10:06:10.000000000 +0200 @@ -90,7 +90,10 @@ char *p, tmp[BLOCK_SEARCH_SIZE]; p = lastFindFile ? strdup(lastFindFile) : NULL; if (!displayMessageAndGetString("File name: ", &p, tmp, sizeof(tmp))) return FALSE; - if (!is_file(tmp)) return FALSE; + if (!is_file(tmp)) { + FREE(p); + return FALSE; + } FREE(lastFindFile); lastFindFile = fileName; fileName = p; return TRUE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hexedit-1.5/interact.c new/hexedit-1.6/interact.c --- old/hexedit-1.5/interact.c 2020-08-28 11:51:07.000000000 +0200 +++ new/hexedit-1.6/interact.c 2022-04-22 10:06:10.000000000 +0200 @@ -341,9 +341,21 @@ switch (key) { - case ERR: case KEY_RESIZE: - /*no-op*/ + /*Close and refresh window to get new size*/ + endwin(); + refresh(); + + /*Reset to trigger recalculation*/ + lineLength = 0; + + clear(); + initDisplay(); + readFile(); + display(); + break; + + case ERR: break; case KEY_RIGHT: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hexedit-1.5/mark.c new/hexedit-1.6/mark.c --- old/hexedit-1.5/mark.c 2020-08-28 11:51:07.000000000 +0200 +++ new/hexedit-1.6/mark.c 2022-04-22 10:06:10.000000000 +0200 @@ -112,6 +112,10 @@ } else if (!hexStringToBinString(tmp2, &l2)) return; } tmp1 = malloc(l1); + if (!tmp1) { + displayMessageAndWaitForKey("Can't allocate memory"); + return; + } for (i = 0; i < l1 - l2 + 1; i += l2) memcpy(tmp1 + i, tmp2, l2); memcpy(tmp1 + i, tmp2, l1 - i); addToEdited(mark_min, l1, tmp1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hexedit-1.5/search.c new/hexedit-1.6/search.c --- old/hexedit-1.5/search.c 2020-08-28 11:51:07.000000000 +0200 +++ new/hexedit-1.6/search.c 2022-04-22 10:06:10.000000000 +0200 @@ -34,6 +34,10 @@ if (hexOrAscii) if (!hexStringToBinString(tmp, sizea)) return FALSE; *string = malloc(*sizea); + if (!*string) { + displayMessageAndWaitForKey("Can't allocate memory"); + return FALSE; + } memcpy(*string, tmp, *sizea); nodelay(stdscr, TRUE);
