[buffer] Minor
diff --git a/src/hb-buffer-serialize.cc b/src/hb-buffer-serialize.cc
index b956116..bd23208 100644
--- a/src/hb-buffer-serialize.cc
+++ b/src/hb-buffer-serialize.cc
@@ -202,13 +202,17 @@
 			    unsigned int end,
 			    char *buf,
 			    unsigned int buf_size,
-			    unsigned int *buf_consumed,
+			    unsigned int *buf_consumed, /* May be NULL */
 			    hb_font_t *font, /* May be NULL */
 			    hb_buffer_serialize_format_t format,
 			    hb_buffer_serialize_flags_t flags)
 {
   assert (start <= end && end <= buffer->len);
 
+  unsigned int sconsumed;
+  if (!buf_consumed)
+    buf_consumed = &sconsumed;
+
   *buf_consumed = 0;
 
   assert ((!buffer->len && buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID) ||
@@ -242,8 +246,8 @@
 hb_bool_t
 hb_buffer_deserialize_glyphs (hb_buffer_t *buffer,
 			      const char *buf,
-			      unsigned int buf_len,
-			      unsigned int *buf_consumed,
+			      unsigned int buf_len, /* -1 means nul-terminated */
+			      unsigned int *buf_consumed, /* May be NULL */
 			      hb_font_t *font, /* May be NULL */
 			      hb_buffer_serialize_format_t format)
 {
diff --git a/src/hb-buffer.h b/src/hb-buffer.h
index 5386e36..d2d17a5 100644
--- a/src/hb-buffer.h
+++ b/src/hb-buffer.h
@@ -304,7 +304,7 @@
 			    unsigned int end,
 			    char *buf,
 			    unsigned int buf_size,
-			    unsigned int *buf_consumed,
+			    unsigned int *buf_consumed, /* May be NULL */
 			    hb_font_t *font, /* May be NULL */
 			    hb_buffer_serialize_format_t format,
 			    hb_buffer_serialize_flags_t flags);
@@ -313,7 +313,7 @@
 hb_buffer_deserialize_glyphs (hb_buffer_t *buffer,
 			      const char *buf,
 			      unsigned int buf_len,
-			      unsigned int *buf_consumed,
+			      unsigned int *buf_consumed, /* May be NULL */
 			      hb_font_t *font, /* May be NULL */
 			      hb_buffer_serialize_format_t format);