From 6195e9e4898927e2739af4cb168aa198ddde39ef Mon Sep 17 00:00:00 2001 From: David Levine Date: Thu, 27 Dec 2012 13:53:33 -0600 Subject: [PATCH] Corrected fseek() emulation to fix test/bad-input/test-header. --- sbr/m_getfld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c index c8a2d8b8..577030c1 100644 --- a/sbr/m_getfld.c +++ b/sbr/m_getfld.c @@ -409,7 +409,7 @@ m_getfld (int state, unsigned char name[NAMESZ], unsigned char *buf, * get extra newlines, but that should be harmless enough, * right? This is a corrupt message anyway. */ /* emulates: fseek (iob, ftell (iob) -2), SEEK_SET) */ - m.readpos += cnt - 1; + m.readpos -= 2; *bufsz = bytes_read; return BODY; } -- 2.56.0