lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1172219070.3265.43.camel@laptopd505.fenrus.org>
Date:	Fri, 23 Feb 2007 09:24:30 +0100
From:	Arjan van de Ven <arjan@...radead.org>
To:	Mockern@...dex.ru
Cc:	linux-kernel@...r.kernel.org
Subject: Re: cat reading problem


> result of strace cat is identical, but in tty case I can't see nothing. Why does cat write nothing at my console?
> 
> Thank you, 
> 
> ------------------------------------------------------------------------------------
> 
> root@...t:/home# strace cat  < hello
> │c│c│c│c│c│c│c│c│c│c│c│c..
> munmap(0x40017000, 5664)                = 0
> getuid32()                              = 0
> getgid32()                              = 0
> setgid32(0)                             = 0
> setuid32(0)                             = 0
> read(0, "Hello World!", 8192)           = 12
> write(1, "Hello World!", 12Hello World!)            = 12

you read "Hello World!" and you write "Hello World!" to the console

> read(0, "\376\377\377f\377\330\0000", 8192) = 8
> write(1, "\376\377\377f\377\330\0000", 8│║ f0) = 8

and here you read garbage from the input, so you write garbage out,
which probably confuses the heck out of your terminal for not being
correct UTF-8


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ