libndr: better debug message in ndr_pull_subcontext_start().
authorGünther Deschner <gd@samba.org>
Thu, 25 Jun 2015 18:50:30 +0000 (20:50 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 3 Jul 2015 00:00:27 +0000 (02:00 +0200)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
librpc/ndr/ndr.c

index 76073ed0b72b5b8c2684b2eaeac4593c1c5e2f3a..453f4d36485855331b4e67850e1b05e4ded05200 100644 (file)
@@ -636,8 +636,10 @@ _PUBLIC_ enum ndr_err_code ndr_pull_subcontext_start(struct ndr_pull *ndr,
                uint16_t content_size;
                NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &content_size));
                if (size_is >= 0 && size_is != content_size) {
-                       return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) size_is(%d) mismatch content_size %d", 
-                                               (int)size_is, (int)content_size);
+                       return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) size_is(%d) (0x%04x) mismatch content_size %d (0x%04x)",
+                                               (int)size_is, (int)size_is,
+                                               (int)content_size,
+                                               (int)content_size);
                }
                r_content_size = content_size;
                break;
@@ -647,8 +649,10 @@ _PUBLIC_ enum ndr_err_code ndr_pull_subcontext_start(struct ndr_pull *ndr,
                uint32_t content_size;
                NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &content_size));
                if (size_is >= 0 && size_is != content_size) {
-                       return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) size_is(%d) mismatch content_size %d", 
-                                               (int)size_is, (int)content_size);
+                       return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) size_is(%d) (0x%08x) mismatch content_size %d (0x%08x)",
+                                               (int)size_is, (int)size_is,
+                                               (int)content_size,
+                                               (int)content_size);
                }
                r_content_size = content_size;
                break;