]> andersk Git - libyaml.git/blobdiff - src/yaml_private.h
Fixed pointer arithmetic overflow when calculating the position of a potential simple...
[libyaml.git] / src / yaml_private.h
index 6320cafdbeefe185e054bac334559c844ee63ef3..ed5ea66cc3ff639316ac8574dcc25b015d7f593f 100644 (file)
@@ -113,6 +113,11 @@ yaml_string_join(
 
 #define STRING(string,length)   { (string), (string)+(length), (string) }
 
+#define STRING_ASSIGN(value,string,length)                                      \
+    ((value).start = (string),                                                  \
+     (value).end = (string)+(length),                                           \
+     (value).pointer = (string))
+
 #define STRING_INIT(context,string,size)                                        \
     (((string).start = yaml_malloc(size)) ?                                     \
         ((string).pointer = (string).start,                                     \
This page took 0.04374 seconds and 4 git commands to generate.