diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-05-16 15:03:48 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-05-16 15:03:48 +0000 |
commit | 9b863398690af5ea356506a7f51da8a862b45087 (patch) | |
tree | c792ee476656bcb12aebffc85eee8f3c47839053 /source3/aparser/vluke.c | |
parent | 058ecd89b45bf4e52194595a320e140483c93d30 (diff) | |
download | samba-9b863398690af5ea356506a7f51da8a862b45087.tar.gz samba-9b863398690af5ea356506a7f51da8a862b45087.tar.bz2 samba-9b863398690af5ea356506a7f51da8a862b45087.zip |
the vluke program now takes a structure name on the command line
(This used to be commit 6a3e7ba4f0716eb414daba4ab8aae974db4deba0)
Diffstat (limited to 'source3/aparser/vluke.c')
-rw-r--r-- | source3/aparser/vluke.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/aparser/vluke.c b/source3/aparser/vluke.c index 5a64e06eb0..7adc396f6d 100644 --- a/source3/aparser/vluke.c +++ b/source3/aparser/vluke.c @@ -30,11 +30,14 @@ int main(int argc, char *argv[]) prs_init(&ps, 0, 4, MARSHALL); ps.is_dynamic=True; prs_read(&ps, fd, st.st_size, 0); - ps.data_offset = 0; + ps.data_offset = 0; + ps.buffer_size = ps.grow_size; ps.io = UNMARSHALL; ret = run_test(test, &ps); printf("\nret=%s\n", ret?"OK":"Bad"); printf("Trailer is %d bytes\n\n", ps.grow_size - ps.data_offset); - dump_data(0, ps.data_p, ps.grow_size); + if (ps.grow_size - ps.data_offset > 0) { + dump_data(0, ps.data_p + ps.data_offset, ps.grow_size - ps.data_offset); + } return !ret; } |