svn commit: samba r13875 - in branches/SAMBA_3_0/source/nmbd
Willi Mann
willi at wm1.at
Mon Mar 6 19:52:20 GMT 2006
Hi!
This is thin ice for me, but this seems strange:
nb_flags = get_nb_flags( rrec->rdata );
- num_ips = rrec->rdlength / 6;
+ if (rrec) {
+ num_ips = rrec->rdlength / 6;
+ } else {
+ num_ips = 0;
+ }
+
If rrec can be 0, then why do you not check for that before the call of
get_nb_flags? Shouldn't the patch look like
- nb_flags = get_nb_flags( rrec->rdata );
- num_ips = rrec->rdlength / 6;
+ if (rrec) {
+ nb_flags = get_nb_flags( rrec->rdata );
+ num_ips = rrec->rdlength / 6;
+ } else {
+ num_ips = 0;
+ }
+
Willi
More information about the samba-technical
mailing list