Displaying 4 results from an estimated 4 matches for "save_read".
Did you mean:
safe_read
2010 Jul 14
1
[PATCH] gfxboot: fix buffer overrun when loading kernel/initramfs
....h>
+#include <minmax.h>
#include <syslinux/loadfile.h>
#include <syslinux/config.h>
@@ -749,7 +750,7 @@ void *load_one(char *file, ssize_t *file_size)
if(size) {
buf = malloc(size);
for(i = 1, cur = 0 ; cur < size && i > 0; cur += i) {
- i = save_read(fd, buf + cur, CHUNK_SIZE);
+ i = save_read(fd, buf + cur, min(CHUNK_SIZE, size - cur));
if(i == -1) break;
gfx_progress_update(i);
}
--
1.7.1
2011 Mar 30
2
[GIT PULL] gfxboot module changes
...ranch 'mcb30/empty-tftp-ip'
are available in the git repository at:
git://repo.or.cz/syslinux/sherbszt.git gfxboot32
Sebastian Herbszt (4):
gfxboot: use skipspace()
gfxboot: don't use the bounce buffer
gfxboot: remove lowmem_buf_size variable
gfxboot: remove save_read() function
com32/gfxboot/gfxboot.c | 66 +++++++++++++---------------------------------
1 files changed, 19 insertions(+), 47 deletions(-)
Sebastian
2010 Apr 09
2
[PATCH] gfxboot: support MENU LABEL statement
...+++++-------------
1 files changed, 50 insertions(+), 19 deletions(-)
diff --git a/com32/gfxboot/gfxboot.c b/com32/gfxboot/gfxboot.c
index bfdd8cc..640422b 100644
--- a/com32/gfxboot/gfxboot.c
+++ b/com32/gfxboot/gfxboot.c
@@ -165,7 +165,7 @@ void gfx_done(void);
int gfx_input(void);
ssize_t save_read(int fd, void *buf, size_t size);
void *load_one(char *file, ssize_t *file_size);
-void boot(void);
+void boot(int index);
void boot_entry(menu_t *menu_ptr, char *arg);
@@ -234,7 +234,7 @@ int main(int argc, char **argv)
}
// does not return if it succeeds
- boot();
+ boot(m...
2004 Feb 06
4
memory reduction
...b 5 20:51:14 2004
@@ -136,9 +136,7 @@ struct file_list *create_flist_from_batc
exit_cleanup(1);
}
- batch_flist = new(struct file_list);
- if (!batch_flist)
- out_of_memory("create_flist_from_batch");
+ batch_flist = flist_new(WITH_HLINK, "create_flist_from_batch");
save_read = stats.total_read;
save_pv = protocol_version;
@@ -153,9 +151,9 @@ struct file_list *create_flist_from_batc
for (i = 0; (flags = read_byte(f)) != 0; i++) {
if (protocol_version >= 28 && (flags & XMIT_EXTENDED_FLAGS))
flags |= read_byte(f) << 8;
- receive_file_entry...