| 632 break; |
632 break; |
| 633 } |
633 } |
| 634 } else if(cx_strprefix(line, s_data)) { |
634 } else if(cx_strprefix(line, s_data)) { |
| 635 line = cx_strsubs(line, 5); |
635 line = cx_strsubs(line, 5); |
| 636 |
636 |
| 637 // util_strtoint just works here, because the line ends with \n |
|
| 638 // the xattr content data is also garanteed to be 0-terminated |
|
| 639 int64_t data_len = 0; |
637 int64_t data_len = 0; |
| 640 if(!util_strtoint(line.ptr, &data_len)) { |
638 if(cx_strtoi64(line, &data_len, 10)) { |
| 641 log_ereport( |
639 log_ereport( |
| 642 LOG_FAILURE, |
640 LOG_FAILURE, |
| 643 "webdav xattr backend: file %s: invalid xattr format[%d]: number expected after data", |
641 "webdav xattr backend: file %s: invalid xattr format[%d]: number expected after data", |
| 644 path, |
642 path, |
| 645 elmno); |
643 elmno); |