Fix null dereference when running out of nodes during rename.

PR:		212370
Submitted by:	Sascha Wildner <swildner AT gmail>
Reviewed by:	bcr (mentor)
Approved by:	bapt
Obtained from:	NetBSD
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D8643
This commit is contained in:
Sevan Janiyan 2016-11-26 13:26:29 +00:00
parent be5d5a33e6
commit a7b3f36393

View file

@ -1070,7 +1070,7 @@ cd9660_rename_filename(cd9660node *iter, int num, int delete_chars)
tmp = malloc(ISO_FILENAME_MAXLENGTH_WITH_PADDING);
while (i < num) {
while (i < num && iter) {
powers = 1;
count = 0;
digits = 1;