mirror of
https://github.com/kevinboone/epub2txt2
synced 2026-04-25 14:24:56 +02:00
Fixed buffer overrun bug
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
build
|
||||
epub2txt
|
||||
*.o
|
||||
|
||||
6
Makefile
6
Makefile
@@ -1,7 +1,7 @@
|
||||
VERSION := 2.02
|
||||
VERSION := 2.03
|
||||
CC := gcc
|
||||
CFLAGS := -Wall -fPIC -fPIE
|
||||
LDLAGS := -pie
|
||||
CFLAGS := -Wall -fPIC -fPIE
|
||||
LDFLAGS := -pie -s
|
||||
DESTDIR :=
|
||||
PREFIX := /usr
|
||||
BINDIR := /bin
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# epub2txt -- Extract text from EPUB documents
|
||||
|
||||
Version 2.02, May 2020
|
||||
Version 2.03, January 2022
|
||||
|
||||
## What is this?
|
||||
|
||||
@@ -232,6 +232,7 @@ even approximately, in ASCII.
|
||||
|
||||
Date | Change
|
||||
-----|-------
|
||||
2.03, Jan 2022 | Fixed a buffer overrun bug
|
||||
2.02, May 2020 | Updated XML parser
|
||||
2.01, January 2019 | Various bug fixes
|
||||
2.0, October 2017 | Completely re-written to do all text processing using 32-bit character arrays, rather than UTF-8 strings, to improve handling of non-English documents.
|
||||
|
||||
@@ -573,7 +573,10 @@ WString *xhtml_translate_entity (const WString *entity)
|
||||
}
|
||||
}
|
||||
else
|
||||
strcpy (out, in);
|
||||
{
|
||||
strncpy (out, in, sizeof (out) - 1);
|
||||
out[sizeof (out) - 1] = 0;
|
||||
}
|
||||
free (in);
|
||||
OUT
|
||||
return wstring_create_from_utf8 (out);
|
||||
|
||||
Reference in New Issue
Block a user