Index: src/core/pbuf.c
===================================================================
--- src/core/pbuf.c	(revisione 968)
+++ src/core/pbuf.c	(copia locale)
@@ -734,11 +734,14 @@
 /**
  * Copy (part of) the contents of a packet buffer
  * to an application supplied buffer.
+ * The number of bytes actually copied is the minimum between buf->tot_len and
+ * the len parameter.
  *
  * @param buf the pbuf from which to copy data
  * @param dataptr the application supplied buffer
  * @param len length of data to copy (dataptr must be big enough)
  * @param offset offset into the packet buffer from where to begin copying len bytes
+ * @return the number of bytes copied, or 0 on failure
  */
 u16_t
 pbuf_copy_partial(struct pbuf *buf, void *dataptr, u16_t len, u16_t offset)
