Changeset 411 for branches/samba-3.3.x/source/libsmb/clirap.c
- Timestamp:
- Mar 1, 2010, 3:05:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/libsmb/clirap.c
r206 r411 271 271 SIVAL(p,0,func); /* api number */ 272 272 p += 2; 273 /* Next time through we need to use the continue api */ 274 func = RAP_NetServerEnum3; 275 276 if (last_entry) { 277 strlcpy(p,"WrLehDOz", sizeof(param)-PTR_DIFF(p,param)); 273 274 if (func == RAP_NetServerEnum3) { 275 strlcpy(p,"WrLehDzz", sizeof(param)-PTR_DIFF(p,param)); 278 276 } else { 279 277 strlcpy(p,"WrLehDz", sizeof(param)-PTR_DIFF(p,param)); … … 294 292 */ 295 293 len = push_ascii(p, 296 last_entry ? last_entry :workgroup,294 workgroup, 297 295 sizeof(param) - PTR_DIFF(p,param) - 1, 298 296 STR_TERMINATE|STR_UPPER); … … 303 301 } 304 302 p += len; 303 304 if (func == RAP_NetServerEnum3) { 305 len = push_ascii(p, 306 last_entry ? last_entry : "", 307 sizeof(param) - PTR_DIFF(p,param) - 1, 308 STR_TERMINATE); 309 310 if (len == (size_t)-1) { 311 SAFE_FREE(last_entry); 312 return false; 313 } 314 p += len; 315 } 316 317 /* Next time through we need to use the continue api */ 318 func = RAP_NetServerEnum3; 305 319 306 320 if (!cli_api(cli, … … 365 379 char *s1, *s2; 366 380 TALLOC_CTX *frame = talloc_stackframe(); 381 uint32_t entry_stype; 367 382 368 383 if (p + 26 > rdata_end) { … … 375 390 cmnt = comment_offset?(rdata+comment_offset):""; 376 391 377 if (comment_offset < 0 || comment_offset > (int)rdrcnt) {392 if (comment_offset < 0 || comment_offset >= (int)rdrcnt) { 378 393 TALLOC_FREE(frame); 379 394 continue; … … 388 403 } 389 404 390 stype = IVAL(p,18) & ~SV_TYPE_LOCAL_LIST_ONLY;405 entry_stype = IVAL(p,18) & ~SV_TYPE_LOCAL_LIST_ONLY; 391 406 392 407 pull_string_talloc(frame,rdata,0, … … 400 415 } 401 416 402 fn(s1, stype, s2, state);417 fn(s1, entry_stype, s2, state); 403 418 TALLOC_FREE(frame); 404 419 }
Note:
See TracChangeset
for help on using the changeset viewer.