@wyang007 commented on this pull request.


In src/XrdApps/Xrdadler32.cc:

> @@ -237,8 +237,14 @@ int main(int argc, char *argv[])
                 printf("Error_accessing: %s\n", argv[1]);
                 return 1;
             }
-            while ( (len = XrdPosixXrootd::Read(fd, buf, N)) > 0 )
-                adler = adler32(adler, (const Bytef*)buf, len);
+            off_t offset = 0;

It is a sequential read, so the offset is always the totlen_sofar. In the case of EC, the reading can go beyond the st_size (we agreed that this maybe an unexpected behavior that is best changed in EC). For now, we need to make sure that

  1. trim extra part in "len" that went beyond the st_size boundary
  2. the next offset doesn't go beyond st_size


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <xrootd/xrootd/pull/1599/review/872818426@github.com>

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/pull/1599#discussion_r799272368", "url": "https://github.com/xrootd/xrootd/pull/1599#discussion_r799272368", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1