Merge branch 'devel' of https://github.com/upx/upx into devel
This commit is contained in:
+6
-1
@@ -85,7 +85,7 @@ compress_lzma$(objext) filteri$(objext) : CXXFLAGS := $(filter-out $(CXXFLAGS_SA
|
||||
endif
|
||||
|
||||
|
||||
all: upx$(exeext) | ./.depend
|
||||
all: check-whitespace upx$(exeext) | ./.depend
|
||||
.DELETE_ON_ERROR: upx$(exeext) $(upx_OBJECTS) ./.depend
|
||||
|
||||
upx$(exeext): $(upx_OBJECTS) $(upx_DEPENDENCIES)
|
||||
@@ -106,6 +106,11 @@ else
|
||||
.PHONY: ./.depend
|
||||
endif
|
||||
|
||||
ifeq ($(shell uname),Linux)
|
||||
check-whitespace : ; bash $(top_srcdir)/src/stub/scripts/check_whitespace.sh $(top_srcdir)
|
||||
endif
|
||||
.PHONY: check-whitespace
|
||||
|
||||
|
||||
./.depend compress_lzma$(objext) : INCLUDES += -I$(UPX_LZMADIR)
|
||||
|
||||
|
||||
+2
-2
@@ -2086,7 +2086,7 @@ int PackMachBase<T>::canUnpack()
|
||||
unsigned const *p;
|
||||
for (p = (unsigned const *)&buf[0x1000]; p > lo; ) if (*--p) {
|
||||
overlay_offset = *(TE32 const *)p;
|
||||
if (overlay_offset < offLINK) {
|
||||
if ((off_t)overlay_offset < offLINK) {
|
||||
overlay_offset -= (char const *)p - (char const *)lo
|
||||
+ (offLINK - 0x1000) - sizeof(l_info);
|
||||
fi->seek(overlay_offset, SEEK_SET);
|
||||
@@ -2097,7 +2097,7 @@ int PackMachBase<T>::canUnpack()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
overlay_offset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#! /usr/bin/env bash
|
||||
## vim:set ts=4 sw=4 et:
|
||||
set -e; set -o pipefail
|
||||
|
||||
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
|
||||
|
||||
[[ -z $1 ]] || cd "$1" || exit 1
|
||||
|
||||
find . \
|
||||
-type d -name '.git' -prune -o \
|
||||
-type d -name '.hg' -prune -o \
|
||||
-type d -name 'build*' -prune -o \
|
||||
-type d -name 'tmp*' -prune -o \
|
||||
-type f -iname '*.bat' -prune -o \
|
||||
-type f -iname '*.exe' -prune -o \
|
||||
-type f -iname '*.pdf' -prune -o \
|
||||
-type f -print0 | LC_ALL=C sort -z | \
|
||||
xargs -0r perl -n -e '
|
||||
if (m,[\r\x1a],) { print "ERROR: DOS EOL detected $ARGV: $_"; exit(1); }
|
||||
if (m,([ \t]+)$,) {
|
||||
# allow exactly two trailing spaces for GitHub flavoured Markdown in .md files
|
||||
if ($1 ne " " || $ARGV !~ m,\.md$,) {
|
||||
print "ERROR: trailing whitespace detected $ARGV: $_"; exit(1);
|
||||
}
|
||||
}
|
||||
if (m,\t,) {
|
||||
if ($ARGV =~ m,(^|/)\.gitmodules$,) { }
|
||||
elsif ($ARGV =~ m,(^|/)(gnu|m)?make(file|vars),i) { }
|
||||
elsif ($ARGV =~ m,/tmp/.*\.(disasm|dump)$,) { }
|
||||
elsif ($ARGV =~ m,/src/stub/src/arch/.*\.S$,) { }
|
||||
else { print "ERROR: hard TAB detected $ARGV: $_"; exit(1); }
|
||||
}
|
||||
' || exit 1
|
||||
Reference in New Issue
Block a user