GNU bug report logs - #46342
28.0.50; socks-send-command munges IP address bytes to UTF-8

Previous Next

Package: emacs;

Reported by: "J.P." <jp <at> neverwas.me>

Date: Sat, 6 Feb 2021 11:47:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 28.0.50

Fixed in version 28.1

Done: "J.P." <jp <at> neverwas.me>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: "J.P." <jp <at> neverwas.me>
Cc: 46342 <at> debbugs.gnu.org
Subject: bug#46342: 28.0.50; socks-send-command munges IP address bytes to UTF-8
Date: Thu, 11 Feb 2021 17:28:06 +0200
> From: "J.P." <jp <at> neverwas.me>
> Cc: 46342 <at> debbugs.gnu.org
> Date: Thu, 11 Feb 2021 06:58:00 -0800
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Then I don't understand why we need to worry about encoding.  IP
> > addresses are pure ASCII strings, so they need no encoding whatsoever.
> 
> Clearly, I'm failing you here. Between my dearth of communications
> skills and lack of Emacs know how, I've obviously managed to deceive you
> into thinking that SOCKS IP address fields ought to contain ASCII text
> characters such as the following:
> 
>   1  9  2  .  1  6  8  .  1  .  1
>   31 39 32 2e 31 36 38 2e 31 2e 31
> 
> However, this is not the case [a]. In version 4, all addresses are
> four-byte sequences, one byte for each component of an IPv4 address, and
> the ordering is left-to-right. For example:
> 
>   192 168 1  1
>   c0  a8  01 01

Then they are what we call "raw bytes", and encoding them with
raw-text-unix should suffice.

How does the code which calls socks.el create these raw bytes?




This bug report was last modified 4 years and 87 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.