summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_backend_printing.c3
-rw-r--r--source3/registry/regfio.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/source3/registry/reg_backend_printing.c b/source3/registry/reg_backend_printing.c
index a4da103d40..582989d8d1 100644
--- a/source3/registry/reg_backend_printing.c
+++ b/source3/registry/reg_backend_printing.c
@@ -443,7 +443,8 @@ static void fill_in_printer_values( NT_PRINTER_INFO_LEVEL_2 *info2, REGVAL_CTR *
/* use a prs_struct for converting the devmode and security
descriptor to REG_BINARY */
- prs_init( &prs, RPC_MAX_PDU_FRAG_LEN, values, MARSHALL);
+ if (!prs_init( &prs, RPC_MAX_PDU_FRAG_LEN, values, MARSHALL))
+ return;
/* stream the device mode */
diff --git a/source3/registry/regfio.c b/source3/registry/regfio.c
index 1c3aad7a25..9eb2c58298 100644
--- a/source3/registry/regfio.c
+++ b/source3/registry/regfio.c
@@ -123,7 +123,10 @@ static int read_block( REGF_FILE *file, prs_struct *ps, uint32 file_offset, uint
return -1;
}
- prs_init( ps, block_size, file->mem_ctx, UNMARSHALL );
+ if (!prs_init( ps, block_size, file->mem_ctx, UNMARSHALL )) {
+ DEBUG(0,("read_block: prs_init() failed! (%s)\n", strerror(errno) ));
+ return -1;
+ }
buffer = prs_data_p( ps );
bytes_read = returned = 0;