You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we can see this lines:
while ((fileInStream.read(buffer)) != -1) {
sendString(Integer.toHexString(buffer.length) +"\r\n");
sendBytes(buffer);
But method InputStream.read() may not read full buffer. This method returns the total number of bytes read into the buffer, and this value should be used in next lines. For send string and as parameter for sendBytes() call.
In current state this method is sending additional bytes from buffer which were not filled by read() call.
The text was updated successfully, but these errors were encountered:
There might very well be some missing or faulty code. I haven't had access to any ICAP hardware in years, so I rely on others to make pull-requests with fixes.
I ran into the same issue. By sending the entire buffer instead of only the remaining bytes our ICAP server didn't recognize the eicar.com testfile because it's hash was changed.
Created a PR for the C# client. Someone needs to test and update this for the Java client too.
In code of
ICAP-avscan/Java/ICAP/src/icap_samplecode/ICAP.java
Line 187 in 27e147b
we can see this lines:
while ((fileInStream.read(buffer)) != -1) {
sendString(Integer.toHexString(buffer.length) +"\r\n");
sendBytes(buffer);
But method InputStream.read() may not read full buffer. This method returns the total number of bytes read into the buffer, and this value should be used in next lines. For send string and as parameter for sendBytes() call.
In current state this method is sending additional bytes from buffer which were not filled by read() call.
The text was updated successfully, but these errors were encountered: