xava: update to 0.6.3.1.

This commit is contained in:
Đoàn Trần Công Danh 2020-08-27 19:57:01 +07:00
parent f2cffd0c68
commit 4744856b35
2 changed files with 2 additions and 38 deletions

View File

@ -1,36 +0,0 @@
From 9748190a7c191ed21d551d816b91a7005c8ef51a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Thu, 27 Aug 2020 07:38:26 +0700
Subject: [PATCH] GetInstallDir: fix buffer overflow
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
strlen(3) will return length of input, not including terminating NUL
character. And strcpy(3) will copy the included NUL character.
Thus, we'll get buffer overflow for 1 character.
Fix it.
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
src/shared.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/shared.c src/shared.c
index 1738650..4c1ce31 100644
--- src/shared.c
+++ src/shared.c
@@ -107,7 +107,7 @@ char *xavaGetInstallDir() {
path[strlen(path)-executableNameSize] = '\0';
#else
// everything non-windows is simple as fuck, go look at the mess above
- const char *path = malloc(strlen(PREFIX"/share/"PACKAGE"/"));
+ const char *path = malloc(strlen(PREFIX"/share/"PACKAGE"/") + 1);
strcpy(path, PREFIX"/share/"PACKAGE"/");
#endif
return path;
--
2.28.0.461.g40977abb40

View File

@ -1,6 +1,6 @@
# Template file for 'xava'
pkgname=xava
version=0.6.3.0
version=0.6.3.1
revision=1
build_style=cmake
hostmakedepends="automake libtool pkg-config"
@ -10,7 +10,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://github.com/nikp123/xava"
distfiles="https://github.com/nikp123/xava/archive/${version}.tar.gz"
checksum=745da4f6690f58e29d9f20ca790b3f354a1f53ef810d4ab6b1027bcac7e62fbf
checksum=b38b810e4bfd71aff44f223b444ae4f158eb8d6428c5e9d42697343ccb5a19f9
post_install() {
vlicense LICENSE