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.

Reply via email to