summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/gsmd/extrsp.h4
-rw-r--r--include/gsmd/gsmd.h1
-rw-r--r--include/gsmd/strl.h12
3 files changed, 16 insertions, 1 deletions
diff --git a/include/gsmd/extrsp.h b/include/gsmd/extrsp.h
index 1f6e6a5..f7c1430 100644
--- a/include/gsmd/extrsp.h
+++ b/include/gsmd/extrsp.h
@@ -7,6 +7,8 @@
/* how many individual sub-ranges can one range contain */
#define GSM_EXTRSP_MAX_RANGES 16
+/* how many character we are going to store in string buffer */
+#define GSM_EXTRSP_MAX_STRBUF 64
struct gsm_extrsp_range_item {
int min;
@@ -28,7 +30,7 @@ struct gsm_extrsp_tok {
struct gsm_extrsp_range_item item[GSM_EXTRSP_MAX_RANGES];
int num_items;
} range;
- char string[64];
+ char string[GSM_EXTRSP_MAX_STRBUF];
int numeric;
} u;
};
diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h
index 585d78d..0521dd5 100644
--- a/include/gsmd/gsmd.h
+++ b/include/gsmd/gsmd.h
@@ -12,6 +12,7 @@
#include <gsmd/vendorplugin.h>
#include <gsmd/select.h>
#include <gsmd/state.h>
+#include <gsmd/strl.h>
void *gsmd_tallocs;
diff --git a/include/gsmd/strl.h b/include/gsmd/strl.h
new file mode 100644
index 0000000..de96ab4
--- /dev/null
+++ b/include/gsmd/strl.h
@@ -0,0 +1,12 @@
+#ifndef __GSMD_STRL_H
+#define __GSMD_STRL_H
+
+#ifdef __GSMD__
+
+/* safe strcpy and strcat versions */
+extern size_t strlcpy(char *dest, const char *src, size_t size);
+extern size_t strlcat(char *dest, const char *src, size_t count);
+
+#endif /* __GSMD__ */
+
+#endif
personal git repositories of Harald Welte. Your mileage may vary