mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Another round of tweaks
Notable changes: - Change a bunch of uses of memcmp(3) to compare strings (which can cause buffer read overflows) to strncmp(3). - src/cmd/ksh93/include/name.h: Eliminate redundant Nambfp_f type. Replace with Shbltin_f type from libast's shcmd.h. Since that is not guaranteed to be included here, repeat the type definition here without fully defining the struct (which is valid in C).
This commit is contained in:
parent
da97587e9e
commit
cc1689849e
21 changed files with 47 additions and 50 deletions
|
|
@ -2,7 +2,7 @@
|
|||
# #
|
||||
# This software is part of the ast package #
|
||||
# Copyright (c) 1985-2011 AT&T Intellectual Property #
|
||||
# Copyright (c) 2020-2021 Contributors to ksh 93u+m #
|
||||
# Copyright (c) 2020-2022 Contributors to ksh 93u+m #
|
||||
# and is licensed under the #
|
||||
# Eclipse Public License, Version 1.0 #
|
||||
# by AT&T Intellectual Property #
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* *
|
||||
* This software is part of the ast package *
|
||||
* Copyright (c) 1985-2012 AT&T Intellectual Property *
|
||||
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
|
||||
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
|
||||
* and is licensed under the *
|
||||
* Eclipse Public License, Version 1.0 *
|
||||
* by AT&T Intellectual Property *
|
||||
|
|
@ -130,7 +130,7 @@ str2inet(register char* s, char* prot, struct sockaddr_in* addr)
|
|||
unsigned long a = 0;
|
||||
unsigned short p = 0;
|
||||
|
||||
if (!memcmp(s, "local/", 6))
|
||||
if (!strncmp(s, "local/", 6))
|
||||
{
|
||||
a = INADDR_LOOPBACK;
|
||||
n = 4;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue