Bug#971643: null pointer dereference with dpkg -V

2020-10-03 Thread John Scott
> Here's the relevant bit of code with a check to diagnose: > void varbuf_add_buf(struct varbuf *v, const void *s, size_t size) > { > varbuf_grow(v, size); > + if(v->buf + v->used == NULL) { > + puts((size == 0) ? "size is zero" : "size is not zero"); > + } > memcpy(v->buf + v->used, s, siz

Bug#971643: null pointer dereference with dpkg -V

2020-10-03 Thread John Scott
Package: dpkg Version: 1.20.5 Severity: normal Tags: upstream X-Debbugs-Cc: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 I cannot reproduce this on a Debian binary package. Hardening flags like FORTIFY_SOURCE may keep this from being an issue. I found this fooling around with ASan: $ ./dpkg -