9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: cinap_lenrek@gmx.de
To: 9fans@9fans.net
Subject: Re: [9fans] jpg bugfix
Date: Tue, 15 Sep 2009 04:55:16 +0200	[thread overview]
Message-ID: <3e3d35eec0312ec65e0b0533d66902bc@gmx.de> (raw)
In-Reply-To: <6a794eca8e2b9a252883671a05ed6344@quanstro.net>

[-- Attachment #1: Type: text/plain, Size: 17 bytes --]

:)

--
cinap

[-- Attachment #2: Type: message/rfc822, Size: 2436 bytes --]

From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: [9fans] jpg bugfix
Date: Mon, 14 Sep 2009 21:49:03 -0400
Message-ID: <6a794eca8e2b9a252883671a05ed6344@quanstro.net>

this fixes a bug triggered by steve's bug report.

; diffy -c readjpg.c
/n/dump/2009/0914/sys/src/cmd/jpg/readjpg.c:441,453 - readjpg.c:441,452
  	uchar tmp[2];

  	m = marker(h);
- 	switch(m){
- 	case EOI:
+ 	if(m == EOI || (m&~7) == RST){
  		*markerp = m;
  		return 0;
- 	case 0:
- 		jpgerror(h, "ReadJPG: expecting marker; saw %.2x at offset %lld", m, Boffset(h->fd));
  	}
+ 	if(m == 0)
+ 		jpgerror(h, "ReadJPG: expecting marker; saw %.2x at offset %lld", m, Boffset(h->fd));
  	if(Bread(h->fd, tmp, 2) != 2)
      Readerr:
  		jpgerror(h, readerr);

- erik

      reply	other threads:[~2009-09-15  2:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15  1:49 erik quanstrom
2009-09-15  2:55 ` cinap_lenrek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3e3d35eec0312ec65e0b0533d66902bc@gmx.de \
    --to=cinap_lenrek@gmx.de \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).