Marek Vasut 於 2025/8/17 下午 08:27 寫道:
On 8/14/25 5:12 PM, Lucien.Jheng wrote:

Hi,

+    if (size > max_size) {
+        log_err("Loaded firmware size 0x%lx exceeded maximum allowed size 0x%lx.\n",
+            size, max_size);
+        return -E2BIG;
+    }
+
+    memcpy(*buf, (void *)addr, min(size, max_size));
Do you still need the min() function ^ here , now that size is surely <= max_size ?

Besides that, I think the patch is pretty much ready.

Hi Marek

The min() function isn't needed. I'll make that change and submit a new patch shortly.

Thanks!

Reply via email to