projects
/
gpac.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03dac4c
)
[PATCH] load_text: prevent overflow on long lines conversion to utf8 (#2386)
author
Aurelien David
<aurelien.david@telecom-paristech.fr>
Tue, 7 Feb 2023 15:01:42 +0000
(16:01 +0100)
committer
Aron Xu
<aron@debian.org>
Tue, 23 May 2023 11:53:25 +0000
(12:53 +0100)
Gbp-Pq: Name CVE-2023-1452.patch
src/filters/load_text.c
patch
|
blob
|
history
diff --git
a/src/filters/load_text.c
b/src/filters/load_text.c
index 8a103f3930d26831123078789ed69551e0a53337..c8718d3930e65fdb937e7907cd1614eb91fb67a6 100644
(file)
--- a/
src/filters/load_text.c
+++ b/
src/filters/load_text.c
@@
-295,6
+295,12
@@
char *gf_text_get_utf8_line(char *szLine, u32 lineSize, FILE *txt_in, s32 unicod
szLineConv[j] = szLine[i];
j++;
+
+ if (j >= GF_ARRAY_LENGTH(szLineConv) - 1) {
+ GF_LOG(GF_LOG_DEBUG, GF_LOG_PARSER, ("[TXTIn] Line too long to convert to utf8 (len: %d)\n", len));
+ break;
+ }
+
}
if ( j >= GF_ARRAY_LENGTH(szLineConv) ) {
GF_LOG(GF_LOG_DEBUG, GF_LOG_PARSER, ("[TXTIn] Line too long to convert to utf8 (len: %d)\n", len));