From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: [patch] isofs/joliet broken on alpha
Date: Mon, 26 Feb 2001 20:31:41 +0300 [thread overview]
Message-ID: <20010226203141.A513@jurassic.park.msu.ru> (raw)
uni16_to_x8() loads unaligned u16 words, returning bogus file names
on an ev5 and older alpha CPUs...
Ivan.
--- 2.4.2-ac4/fs/isofs/joliet.c Fri Feb 9 22:29:44 2001
+++ linux/fs/isofs/joliet.c Mon Feb 26 17:06:54 2001
@@ -10,6 +10,7 @@
#include <linux/nls.h>
#include <linux/slab.h>
#include <linux/iso_fs.h>
+#include <asm/unaligned.h>
/*
* Convert Unicode 16 to UTF8 or ASCII.
@@ -17,15 +18,15 @@
static int
uni16_to_x8(unsigned char *ascii, u16 *uni, int len, struct nls_table *nls)
{
- wchar_t *ip;
+ wchar_t *ip, ch;
unsigned char *op;
ip = uni;
op = ascii;
- while (*ip && len) {
+ while ((ch = get_unaligned(ip)) && len) {
int llen;
- wchar_t ch = be16_to_cpu(*ip);
+ ch = be16_to_cpu(ch);
if ((llen = nls->uni2char(ch, op, NLS_MAX_CHARSET_SIZE)) > 0)
op += llen;
else
reply other threads:[~2001-02-26 17:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20010226203141.A513@jurassic.park.msu.ru \
--to=ink@jurassic.park.msu.ru \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®