summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-01-16 16:35:10 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-01-16 16:36:47 +0100
commit4eddbe86fad990612b5f134b8ba44976be91abfd (patch)
tree551cb2dd40f87920c6c293a36b9deb9d2463d1ad
parent551d63d20cf7cc9b1e9aa7d6d452857c4310350a (diff)
downloadlibtasn1-4eddbe86fad990612b5f134b8ba44976be91abfd.tar.gz
_asn1_ltostr: avoid undefined negation of int64_t
Use cast to (uint64_t) and negation instead. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r--lib/parser_aux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/parser_aux.c b/lib/parser_aux.c
index 7313eeb..b4a7370 100644
--- a/lib/parser_aux.c
+++ b/lib/parser_aux.c
@@ -560,7 +560,7 @@ _asn1_ltostr (int64_t v, char str[LTOSTR_MAX_SIZE])
{
str[0] = '-';
start = 1;
- val = -v;
+ val = -((uint64_t)v);
}
else
{