void-packages/srcpkgs/catdoc/patches/003-Fix_OLENAMELENGTH.patch
Đoàn Trần Công Danh c987560802 srcpkgs/c*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

17 lines
389 B
Diff

Description: Fixes opening many Libreoffice documents.
Bug-Debian: https://bugs.debian.org/874048
Forwarded: no
Author: Robert Zavalczki <robert.zavalczki@gmail.com>
Last-Update: 2017-09-13
--- a/src/ole.c
+++ b/src/ole.c
@@ -342,7 +342,7 @@
e->blocks=NULL;
nLen=getshort(oleBuf,0x40);
- if (nLen > OLENAMELENGTH) {
+ if (nLen > OLENAMELENGTH * 2) {
free(e);
return NULL;
}