lidavidm commented on code in PR #908:
URL: https://github.com/apache/arrow-adbc/pull/908#discussion_r1277958727


##########
c/driver/postgresql/postgres_copy_reader.h:
##########
@@ -221,20 +222,28 @@ class PostgresCopyIntervalFieldReader : public 
PostgresCopyFieldReader {
       return ArrowArrayAppendNull(array, 1);
     }
 
-    if (field_size_bytes != 128) {
+    if (field_size_bytes != 16) {
       ArrowErrorSet(error, "Expected field with %d bytes but found field with 
%d bytes",
-                    128,
+                    16,
                     static_cast<int>(field_size_bytes));  // 
NOLINT(runtime/int)
       return EINVAL;
     }
 
     // postgres stores time as usec, arrow stores as ns
-    const int64_t time = ReadUnsafe<int64_t>(data) * 1000;
+    const int64_t time_usec = ReadUnsafe<int64_t>(data);
+
+    if ((time_usec > INT64_MAX / 1000) | (time_usec < INT64_MIN / 1000)) {

Review Comment:
   Ah, in this repo.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to