This commit is contained in:
Andrew Phelps 2024-08-30 11:55:55 -07:00 коммит произвёл GitHub
Родитель 2cf25b8c83
Коммит e9ceede2ec
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
4 изменённых файлов: 12 добавлений и 28 удалений

Просмотреть файл

@ -1,21 +0,0 @@
diff --git a/src/os/getenv_s.c b/src/os/getenv_s.c
--- a/src/os/getenv_s.c
+++ b/src/os/getenv_s.c
@@ -119,12 +119,14 @@ EXPORT errno_t _getenv_s_chk(size_t *restrict len, char *restrict dest,
buf = getenv(name);
#endif
- if (unlikely(buf == NULL)) {
- char errstr[128] = "getenv_s: ";
+ if (buf == NULL) {
+#ifdef SAFECLIB_STR_NULL_SLACK
+ memset(dest, 0, dmax);
+#else
+ *dest = '\0';
+#endif
if (len)
*len = 0;
- strcat(errstr, strerror(errno));
- handle_error(dest, dmax, errstr, -1);
return -1;
}

Просмотреть файл

@ -1,5 +1,5 @@
{
"Signatures": {
"safeclib-3.7.1.tar.xz": "71d3ec970f930bd980f2a41127228eeedfc53749e4c6b203329adc4ff7df32a7"
"safeclib-3.8.1.tar.xz": "59c72d1257dc425c3cd02c6ca7ff2edbe80cad7988e9c55471d2c6ba2c2b9db9"
}
}

Просмотреть файл

@ -1,11 +1,13 @@
%define full_version %{version}.0
%define commit_hash gdfea26
Summary: C11 Annex K functions
Name: libsafec
Version: 3.7.1
Release: 2%{?dist}
Version: 3.8.1
Release: 1%{?dist}
License: MIT
URL: https://github.com/rurban/safeclib
Source0: https://github.com/rurban/safeclib/releases/download/v%{version}/safeclib-%{version}.tar.xz
Patch0: libsafec-3.7.1-issue119.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: awk
@ -33,7 +35,7 @@ Summary: Tools to detect use of unsafe libc APIs
Tools to detect use of unsafe libc APIs
%prep
%autosetup -n safeclib-%{version} -p1
%autosetup -n safeclib-%{full_version}-%{commit_hash} -p1
%build
autoreconf -Wall --install
@ -68,6 +70,9 @@ find %{buildroot} -type f -name "*.pc" -delete -print
%{_mandir}/man1/*
%changelog
* Thu Aug 29 2024 Andrew Phelps <anphel@microsoft.com> - 3.8.1-1
- Upgrade to version 3.8.1
* Wed Jul 13 2022 Andy Caldwell <andycaldwell@microsoft.com> - 3.7.1-2
- Don't emit runtime safety check when getenv fails to find variable.

Просмотреть файл

@ -10761,8 +10761,8 @@
"type": "other",
"other": {
"name": "libsafec",
"version": "3.7.1",
"downloadUrl": "https://github.com/rurban/safeclib/releases/download/v3.7.1/safeclib-3.7.1.tar.xz"
"version": "3.8.1",
"downloadUrl": "https://github.com/rurban/safeclib/releases/download/v3.8.1/safeclib-3.8.1.tar.xz"
}
}
},