summaryrefslogtreecommitdiff
path: root/lib/gstr.c
diff options
context:
space:
mode:
authorDariusz Michaluk <d.michaluk@samsung.com>2024-02-13 15:38:29 +0100
committerDariusz Michaluk <d.michaluk@samsung.com>2024-02-13 15:38:29 +0100
commit031996ef501f8c3d0532f7df1c38cf2e540a4f11 (patch)
tree27217d793b273edadc969aa3110378aac3c36e9c /lib/gstr.c
parent26bea900a531662c6028ecc06f4adea825658434 (diff)
downloadlibtasn1-031996ef501f8c3d0532f7df1c38cf2e540a4f11.tar.gz
libtasn1-031996ef501f8c3d0532f7df1c38cf2e540a4f11.tar.bz2
libtasn1-031996ef501f8c3d0532f7df1c38cf2e540a4f11.zip
Imported Upstream version 4.19.0upstream/4.19.0upstream
Diffstat (limited to 'lib/gstr.c')
-rw-r--r--lib/gstr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gstr.c b/lib/gstr.c
index e91a3a1..eef4195 100644
--- a/lib/gstr.c
+++ b/lib/gstr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2002-2014 Free Software Foundation, Inc.
+ * Copyright (C) 2002-2022 Free Software Foundation, Inc.
*
* This file is part of LIBTASN1.
*
@@ -40,7 +40,7 @@ _asn1_str_cat (char *dest, size_t dest_tot_size, const char *src)
}
else
{
- if (dest_tot_size - dest_size > 0)
+ if (dest_tot_size > dest_size)
{
strncat (dest, src, (dest_tot_size - dest_size) - 1);
dest[dest_tot_size - 1] = 0;