@@ -210,7 +210,7 @@ pktreader_free(void *priv)
210210{
211211 struct PktData * pkt = priv ;
212212
213- memset (pkt , 0 , sizeof (* pkt ));
213+ px_memset (pkt , 0 , sizeof (* pkt ));
214214 px_free (pkt );
215215}
216216
@@ -257,7 +257,7 @@ prefix_init(void **priv_p, void *arg, PullFilter *src)
257257 if (res != len + 2 )
258258 {
259259 px_debug ("prefix_init: short read" );
260- memset (tmpbuf , 0 , sizeof (tmpbuf ));
260+ px_memset (tmpbuf , 0 , sizeof (tmpbuf ));
261261 return PXE_PGP_CORRUPT_DATA ;
262262 }
263263
@@ -280,7 +280,7 @@ prefix_init(void **priv_p, void *arg, PullFilter *src)
280280 */
281281 ctx -> corrupt_prefix = 1 ;
282282 }
283- memset (tmpbuf , 0 , sizeof (tmpbuf ));
283+ px_memset (tmpbuf , 0 , sizeof (tmpbuf ));
284284 return 0 ;
285285}
286286
@@ -395,8 +395,8 @@ mdc_finish(PGP_Context *ctx, PullFilter *src,
395395 */
396396 px_md_finish (ctx -> mdc_ctx , hash );
397397 res = memcmp (hash , * data_p , 20 );
398- memset (hash , 0 , 20 );
399- memset (tmpbuf , 0 , sizeof (tmpbuf ));
398+ px_memset (hash , 0 , 20 );
399+ px_memset (tmpbuf , 0 , sizeof (tmpbuf ));
400400 if (res != 0 )
401401 {
402402 px_debug ("mdc_finish: mdc failed" );
@@ -493,7 +493,7 @@ mdcbuf_finish(struct MDCBufData * st)
493493 px_md_update (st -> ctx -> mdc_ctx , st -> mdc_buf , 2 );
494494 px_md_finish (st -> ctx -> mdc_ctx , hash );
495495 res = memcmp (hash , st -> mdc_buf + 2 , 20 );
496- memset (hash , 0 , 20 );
496+ px_memset (hash , 0 , 20 );
497497 if (res )
498498 {
499499 px_debug ("mdcbuf_finish: MDC does not match" );
@@ -593,7 +593,7 @@ mdcbuf_free(void *priv)
593593
594594 px_md_free (st -> ctx -> mdc_ctx );
595595 st -> ctx -> mdc_ctx = NULL ;
596- memset (st , 0 , sizeof (* st ));
596+ px_memset (st , 0 , sizeof (* st ));
597597 px_free (st );
598598}
599599
@@ -703,7 +703,7 @@ parse_symenc_sesskey(PGP_Context *ctx, PullFilter *src)
703703 res = decrypt_key (ctx , p , res );
704704 }
705705
706- memset (tmpbuf , 0 , sizeof (tmpbuf ));
706+ px_memset (tmpbuf , 0 , sizeof (tmpbuf ));
707707 return res ;
708708}
709709
@@ -753,6 +753,7 @@ copy_crlf(MBuf *dst, uint8 *data, int len, int *got_cr)
753753 if (res < 0 )
754754 return res ;
755755 }
756+ px_memset (tmpbuf , 0 , sizeof (tmpbuf ));
756757 return 0 ;
757758}
758759
@@ -792,7 +793,7 @@ parse_literal_data(PGP_Context *ctx, MBuf *dst, PullFilter *pkt)
792793 px_debug ("parse_literal_data: unexpected eof" );
793794 return PXE_PGP_CORRUPT_DATA ;
794795 }
795- memset (tmpbuf , 0 , 4 );
796+ px_memset (tmpbuf , 0 , 4 );
796797
797798 /* check if text */
798799 if (ctx -> text_mode )
0 commit comments