Author: emaste
Date: Tue Jun  4 19:39:06 2019
New Revision: 348668
URL: https://svnweb.freebsd.org/changeset/base/348668

Log:
  vtfontcvt: zero memory allocated by xmalloc
  
  PR:           205707
  Submitted by: Dmitry Wagin

Modified:
  head/usr.bin/vtfontcvt/vtfontcvt.c

Modified: head/usr.bin/vtfontcvt/vtfontcvt.c
==============================================================================
--- head/usr.bin/vtfontcvt/vtfontcvt.c  Tue Jun  4 19:37:51 2019        
(r348667)
+++ head/usr.bin/vtfontcvt/vtfontcvt.c  Tue Jun  4 19:39:06 2019        
(r348668)
@@ -102,7 +102,7 @@ xmalloc(size_t size)
 {
        void *m;
 
-       if ((m = malloc(size)) == NULL)
+       if ((m = calloc(1, size)) == NULL)
                errx(1, "memory allocation failure");
        return (m);
 }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to