diff
+ if (i >= bufsize) {
+     ret = -EOVERFLOW;
+     goto out_free_buf;
+ }
  buf[i] = '\0';
