Browse code

Merge c528f7021a5e011723fa763f08f471af5b28ff79 into d52f60173be34c5c1581c762444b5e26c57b097a

Alex Hermann authored on 20/10/2020 13:00:26 • GitHub committed on 20/10/2020 13:00:26
Showing 1 changed files
... ...
@@ -40,13 +40,16 @@
40 40
  * need to make a zero-terminated copy of it.
41 41
  *
42 42
  * @section drawbacks Drawbacks
43
- * Note well that the fact that string stored
44
- * using this data structure are not zero terminated makes them a little
45
- * incovenient to use with many standard libc string functions, because these
46
- * usually expect the input to be zero-terminated. In this case you have to
47
- * either make a zero-terminated copy or inject the terminating zero behind
48
- * the actuall string (if possible). Note that injecting a zero terminating
49
- * characters is considered to be dangerous.
43
+ * Note well that the fact that a string stored
44
+ * using this data structure are not guaranteed to be zero terminated (by
45
+ * default they're not) makes them a little incovenient to use with many
46
+ * standard libc string functions, because these usually expect the input
47
+ * to be zero-terminated.
48
+ * In this case you have to either make a zero-terminated copy or inject the
49
+ * terminating zero behind the actuall string (if possible). Note that
50
+ * injecting a zero terminating characters is considered to be dangerous.
51
+ * The functions shm_str_dup() and pkg_str_dup() will always create a
52
+ * zero-terminated copy.
50 53
  */
51 54
 
52 55
 /** @file