SHA256
1
0
forked from pool/git
git/CVE-2024-24577.patch
Dirk Mueller 5792d0456b - Add CVE-2024-24577.patch
* CVE-2024-24577: arbitrary code execution due to heap corruption
    in git_index_add (boo#1219660)

OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/git?expand=0&rev=650
2024-07-19 09:14:49 +00:00

21 lines
390 B
Diff

Index: b/read-cache.c
===================================================================
--- a/read-cache.c
+++ b/read-cache.c
@@ -1158,10 +1158,13 @@ static int has_dir_name(struct index_sta
size_t len;
for (;;) {
- if (*--slash == '/')
- break;
+ slash--;
+
if (slash <= ce->name)
return retval;
+
+ if (*slash == '/')
+ break;
}
len = slash - name;