aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2012-08-17 01:12:10 +0000
committerEvan Huus <eapache@gmail.com>2012-08-17 01:12:10 +0000
commit81f3e4f4a8d8cb3dde54c351ca4838b2bd455e3f (patch)
tree9b6af48117a03043dd03439a68f38f83d94b7ae8 /doc
parent2fe5163ec30e30d5b8b875d34efb4d722dc340a1 (diff)
Add note to README.developer about not passing NULL to %s format strings.
Part of wireshark-dev conversation starting with: http://www.wireshark.org/lists/wireshark-dev/201208/msg00125.html svn path=/trunk/; revision=44548
Diffstat (limited to 'doc')
-rw-r--r--doc/README.developer4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/README.developer b/doc/README.developer
index 1bbc52a8c7..2d64958535 100644
--- a/doc/README.developer
+++ b/doc/README.developer
@@ -456,6 +456,10 @@ we do not want any new callers of these functions.
Instead use g_snprintf() since that function will if used correctly prevent
buffer overflows for large strings.
+Be sure that all pointers passed to %s specifiers in format strings are non-
+NULL. Some implementations will automatically replace NULL pointers with the
+string "(NULL)", but most will not.
+
When using a buffer to create a string, do not use a buffer stored on the stack.
I.e. do not use a buffer declared as