From: Wolfram Sang wsa@kernel.org
mainline inclusion from mainline-5.8 commit 6020db504cece0d93cc31c6f73609ef1304607e2 category: bugfix bugzilla: 46847 CVE: NA
-----------------------------------------------
Mention why we open-code strsep, so it is clear that it is intentional.
Fixes: 736bb11898ef ("modpost: remove use of non-standard strsep() in HOSTCC code") Signed-off-by: Wolfram Sang wsa@kernel.org Signed-off-by: Masahiro Yamada masahiroy@kernel.org Signed-off-by: Wang Wensheng wangwensheng4@huawei.com Reviewed-by: Jian Cheng cj.chengjian@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- scripts/mod/modpost.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index b476d84feda7..683c95731150 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -166,6 +166,7 @@ char *get_line(char **stringp) if (!orig || *orig == '\0') return NULL;
+ /* don't use strsep here, it is not available everywhere */ next = strchr(orig, '\n'); if (next) *next++ = '\0';