diff options
author | CoprDistGit <infra@openeuler.org> | 2024-01-20 09:57:05 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-01-20 09:57:05 +0000 |
commit | c56563a5cfb85fcba9f28dd1df9647037eb2931e (patch) | |
tree | 82e936c48ac53d5a05ac395f897e421a743f8023 /0063-code-improve-for-oci_rmi.patch | |
parent | 8c7a257a80c20ee3fae444f9e3d670a86dca161f (diff) |
automatic import of iSuladopeneuler23.09openeuler22.03_LTS_SP2
Diffstat (limited to '0063-code-improve-for-oci_rmi.patch')
-rw-r--r-- | 0063-code-improve-for-oci_rmi.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/0063-code-improve-for-oci_rmi.patch b/0063-code-improve-for-oci_rmi.patch new file mode 100644 index 0000000..0d8f427 --- /dev/null +++ b/0063-code-improve-for-oci_rmi.patch @@ -0,0 +1,35 @@ +From 2db6add74c621344e902ce28b5e6764f6ef55b8e Mon Sep 17 00:00:00 2001 +From: zhongtao <zhongtao17@huawei.com> +Date: Mon, 18 Dec 2023 16:07:57 +0800 +Subject: [PATCH 63/64] code improve for oci_rmi + +Signed-off-by: zhongtao <zhongtao17@huawei.com> +--- + src/daemon/modules/image/oci/oci_image.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/src/daemon/modules/image/oci/oci_image.c b/src/daemon/modules/image/oci/oci_image.c +index 471510e7..9cf2cd4f 100644 +--- a/src/daemon/modules/image/oci/oci_image.c ++++ b/src/daemon/modules/image/oci/oci_image.c +@@ -542,6 +542,17 @@ int oci_rmi(const im_rmi_request *request) + goto out; + } + ++ for (i = 0; i < image_names_len; i++) { ++ if (strcmp(real_image_name, image_names[i]) == 0) { ++ break; ++ } ++ } ++ if (i == image_names_len) { ++ ERROR("Invalid real_image_name"); ++ ret = -1; ++ goto out; ++ } ++ + reduced_image_names = (char **)util_smart_calloc_s(sizeof(char *), image_names_len - 1); + if (reduced_image_names == NULL) { + ERROR("Out of memory"); +-- +2.42.0 + |