summaryrefslogtreecommitdiff
path: root/src/libstrongswan/chunk.c
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@corsac.net>2012-06-28 21:16:07 +0200
committerYves-Alexis Perez <corsac@corsac.net>2012-06-28 21:16:07 +0200
commitb34738ed08c2227300d554b139e2495ca5da97d6 (patch)
tree62f33b52820f2e49f0e53c0f8c636312037c8054 /src/libstrongswan/chunk.c
parent0a9d51a49042a68daa15b0c74a2b7f152f52606b (diff)
downloadvyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.tar.gz
vyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.zip
Imported Upstream version 4.6.4
Diffstat (limited to 'src/libstrongswan/chunk.c')
-rw-r--r--src/libstrongswan/chunk.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libstrongswan/chunk.c b/src/libstrongswan/chunk.c
index 9a4152145..9397c4e44 100644
--- a/src/libstrongswan/chunk.c
+++ b/src/libstrongswan/chunk.c
@@ -57,7 +57,7 @@ chunk_t chunk_create_clone(u_char *ptr, chunk_t chunk)
}
/**
- * Decribed in header.
+ * Described in header.
*/
size_t chunk_length(const char* mode, ...)
{
@@ -87,7 +87,7 @@ size_t chunk_length(const char* mode, ...)
}
/**
- * Decribed in header.
+ * Described in header.
*/
chunk_t chunk_create_cat(u_char *ptr, const char* mode, ...)
{
@@ -133,7 +133,7 @@ chunk_t chunk_create_cat(u_char *ptr, const char* mode, ...)
}
/**
- * Decribed in header.
+ * Described in header.
*/
void chunk_split(chunk_t chunk, const char *mode, ...)
{
@@ -313,7 +313,7 @@ chunk_t chunk_from_hex(chunk_t hex, char *buf)
/* subtract the number of optional ':' separation characters */
len = hex.len;
ptr = hex.ptr;
- for (i = 0; i < hex.len; i++)
+ for (i = 0; i < hex.len; i++)
{
if (*ptr++ == ':')
{
@@ -668,7 +668,8 @@ int chunk_printf_hook(char *dst, size_t len, printf_hook_spec_t *spec,
if (!spec->hash)
{
- const void *new_args[] = {&chunk->ptr, &chunk->len};
+ u_int chunk_len = chunk->len;
+ const void *new_args[] = {&chunk->ptr, &chunk_len};
return mem_printf_hook(dst, len, spec, new_args);
}