[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU libtasn1 branch, master, updated. libtasn1_3_4-14-ga8b3e14
From: |
Nikos Mavrogiannopoulos |
Subject: |
[SCM] GNU libtasn1 branch, master, updated. libtasn1_3_4-14-ga8b3e14 |
Date: |
Tue, 15 Apr 2014 11:49:44 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU libtasn1".
http://git.savannah.gnu.org/cgit/libtasn1.git/commit/?id=a8b3e14f84174e01755bfd1be5448fffce7c9ffa
The branch, master has been updated
via a8b3e14f84174e01755bfd1be5448fffce7c9ffa (commit)
from 4f804770ddc711b0033dc13d4cbe89cd39efc8e4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a8b3e14f84174e01755bfd1be5448fffce7c9ffa
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Tue Apr 15 13:49:40 2014 +0200
Do not try to write over null values
-----------------------------------------------------------------------
Summary of changes:
lib/element.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/lib/element.c b/lib/element.c
index ee77feb..8addf02 100644
--- a/lib/element.c
+++ b/lib/element.c
@@ -621,7 +621,8 @@ asn1_write_value (asn1_node node_root, const char *name,
if (ptr_size < data_size) { \
return ASN1_MEM_ERROR; \
} else { \
- memcpy( ptr, data, data_size); \
+ if (ptr) \
+ memcpy( ptr, data, data_size); \
}
#define PUT_STR_VALUE( ptr, ptr_size, data) \
@@ -630,7 +631,8 @@ asn1_write_value (asn1_node node_root, const char *name,
return ASN1_MEM_ERROR; \
} else { \
/* this strcpy is checked */ \
- _asn1_strcpy(ptr, data); \
+ if (ptr) \
+ _asn1_strcpy(ptr, data); \
}
#define PUT_AS_STR_VALUE( ptr, ptr_size, data, data_size) \
@@ -639,8 +641,10 @@ asn1_write_value (asn1_node node_root, const char *name,
return ASN1_MEM_ERROR; \
} else { \
/* this strcpy is checked */ \
- memcpy(ptr, data, data_size); \
- ptr[data_size] = 0; \
+ if (ptr) { \
+ memcpy(ptr, data, data_size); \
+ ptr[data_size] = 0; \
+ } \
}
#define ADD_STR_VALUE( ptr, ptr_size, data) \
@@ -649,7 +653,7 @@ asn1_write_value (asn1_node node_root, const char *name,
return ASN1_MEM_ERROR; \
} else { \
/* this strcat is checked */ \
- _asn1_strcat(ptr, data); \
+ if (ptr) _asn1_strcat(ptr, data); \
}
/**
hooks/post-receive
--
GNU libtasn1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU libtasn1 branch, master, updated. libtasn1_3_4-14-ga8b3e14,
Nikos Mavrogiannopoulos <=