summaryrefslogtreecommitdiff
path: root/backport-CVE-2024-41130.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-11-14 08:21:17 +0000
committerCoprDistGit <infra@openeuler.org>2024-11-14 08:21:17 +0000
commit6af2b9d9f9a1ee9b6d899b9f8cb9e8dffa6d3a4a (patch)
treeb0d8990679bbc33e1823efa14e393a6eb2d6604f /backport-CVE-2024-41130.patch
parentbddc14c899cdec561069d85567df778bcde7405f (diff)
automatic import of llama.cpp
Diffstat (limited to 'backport-CVE-2024-41130.patch')
-rw-r--r--backport-CVE-2024-41130.patch41
1 files changed, 0 insertions, 41 deletions
diff --git a/backport-CVE-2024-41130.patch b/backport-CVE-2024-41130.patch
deleted file mode 100644
index d1c6a23..0000000
--- a/backport-CVE-2024-41130.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 07283b1a90e1320aae4762c7e03c879043910252 Mon Sep 17 00:00:00 2001
-From: Georgi Gerganov <ggerganov@gmail.com>
-Date: Sat, 20 Jul 2024 17:15:42 +0300
-Subject: [PATCH] gguf : handle null name during init (#8587)
-
----
- examples/gguf/gguf.cpp | 5 +++++
- ggml.c | 2 +-
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/examples/gguf/gguf.cpp b/examples/gguf/gguf.cpp
-index 57514377..7498f85e 100644
---- a/examples/gguf/gguf.cpp
-+++ b/examples/gguf/gguf.cpp
-@@ -92,6 +92,11 @@ static bool gguf_ex_read_0(const std::string & fname) {
-
- struct gguf_context * ctx = gguf_init_from_file(fname.c_str(), params);
-
-+ if (!ctx) {
-+ fprintf(stderr, "%s: failed to load '%s'\n", __func__, fname.c_str());
-+ return false;
-+ }
-+
- printf("%s: version: %d\n", __func__, gguf_get_version(ctx));
- printf("%s: alignment: %zu\n", __func__, gguf_get_alignment(ctx));
- printf("%s: data offset: %zu\n", __func__, gguf_get_data_offset(ctx));
-diff --git a/ggml.c b/ggml.c
-index 7a39c685..dbb3a3eb 100644
---- a/ggml.c
-+++ b/ggml.c
-@@ -21015,7 +21015,7 @@ struct gguf_context * gguf_init_from_file(const char * fname, struct gguf_init_p
- gguf_tensor_info_sanitize(info);
-
- // make sure there is no duplicated tensor names
-- for (uint64_t j = 0; j < i; ++j) {
-+ for (uint64_t j = 0; j < i && ok; ++j) {
- if (strcmp(info->name.data, ctx->infos[j].name.data) == 0) {
- fprintf(stderr, "%s: duplicated tensor name %s\n", __func__, info->name.data);
- ok = false;
---
-2.20.1