1 Star 0 Fork 11

orange-snn/libyang

forked from src-openEuler/libyang 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
CVE-2021-28904.patch 1.07 KB
Copy Edit Raw Blame History
From 59a0bff1a5a2f0a0eac07e4bf94d4aea9dd3708d Mon Sep 17 00:00:00 2001
From: Michal Vasko <mvasko@cesnet.cz>
Date: Mon, 8 Mar 2021 09:20:30 +0100
Subject: [PATCH] plugins BUGFIX handle empty revision correctly
Fixes #1451
---
src/plugins.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/plugins.c b/src/plugins.c
index 7e6fdf358..fa62ce76c 100644
--- a/src/plugins.c
+++ b/src/plugins.c
@@ -457,9 +457,8 @@ ext_get_plugin(const char *name, const char *module, const char *revision)
assert(module);
for (u = 0; u < ext_plugins_count; u++) {
- if (!strcmp(name, ext_plugins[u].name) &&
- !strcmp(module, ext_plugins[u].module) &&
- (!ext_plugins[u].revision || !strcmp(revision, ext_plugins[u].revision))) {
+ if (!strcmp(name, ext_plugins[u].name) && !strcmp(module, ext_plugins[u].module) &&
+ ((!revision && !ext_plugins[u].revision) || (revision && !strcmp(revision, ext_plugins[u].revision)))) {
/* we have the match */
return ext_plugins[u].plugin;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/orange-snn/libyang.git
git@gitee.com:orange-snn/libyang.git
orange-snn
libyang
libyang
master

Search