ports/net/ser/files/patch-modules::usrloc::udomain.c
Maxim Sobolev 3bd1905091 Fix possible coredump in usrloc module (backported from soon to be released
0.9.0.

Reported by:	Barry Murphy <barry@unix.co.nz>
2005-03-15 08:54:51 +00:00

14 lines
365 B
C

$FreeBSD$
--- modules/usrloc/udomain.c
+++ modules/usrloc/udomain.c
@@ -288,7 +288,7 @@
}
flags = VAL_BITMAP(ROW_VALUES(row) + 8);
ua.s = (char*)VAL_STRING(ROW_VALUES(row) + 9);
- ua.len = strlen(ua.s);
+ ua.len = (ua.s != NULL) ? strlen(ua.s) : 0;
if (use_domain) {
domain = (char*)VAL_STRING(ROW_VALUES(row) + 10);