Loading drivers/usb/gadget/function/storage_common.c +3 −0 Original line number Original line Diff line number Diff line Loading @@ -376,6 +376,9 @@ ssize_t fsg_show_file(struct fsg_lun *curlun, struct rw_semaphore *filesem, rc = PTR_ERR(p); rc = PTR_ERR(p); else { else { rc = strlen(p); rc = strlen(p); if (rc > PAGE_SIZE - 2) rc = PAGE_SIZE - 2; memmove(buf, p, rc); memmove(buf, p, rc); buf[rc] = '\n'; /* Add a newline */ buf[rc] = '\n'; /* Add a newline */ buf[++rc] = 0; buf[++rc] = 0; Loading Loading
drivers/usb/gadget/function/storage_common.c +3 −0 Original line number Original line Diff line number Diff line Loading @@ -376,6 +376,9 @@ ssize_t fsg_show_file(struct fsg_lun *curlun, struct rw_semaphore *filesem, rc = PTR_ERR(p); rc = PTR_ERR(p); else { else { rc = strlen(p); rc = strlen(p); if (rc > PAGE_SIZE - 2) rc = PAGE_SIZE - 2; memmove(buf, p, rc); memmove(buf, p, rc); buf[rc] = '\n'; /* Add a newline */ buf[rc] = '\n'; /* Add a newline */ buf[++rc] = 0; buf[++rc] = 0; Loading