[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-dbus
Subject:    Problem with dbus-uuigen --get
From:       David Castelow <david_castelow () hotmail ! com>
Date:       2007-10-28 16:20:06
Message-ID: BLU103-W1DFE3457653BE98B50022FA900 () phx ! gbl
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

The man page for dbus-uuigen states that the --get option will report the contents of \
the file /var/lib/dbus/machine-id, but on my system (Ubuntu Feisty (07.04)) it does \
not: the final byte is wrong.

I have looked into this in both the Ubuntu package sources and by inspection in the \
latest package (1.1.2) and believe the problem is because when (in dbus-internals.c) \
_dbus_read_uuid_file_without_creating()  calls _dbus_string_copy_to_buffer() it does \
so with size 16 bytes, but the string needs a NULL termination: \
_dbus_string_copy_to_buffer() over-writes the last byte in the array.

Is this known about, in which case the man page should be adjusted, or the copy \
adjusted so that the terminal NULL byte is appended rather than over-writing.

I haven't checked to see if there is any impact on, e.g. --ensure.

David





_________________________________________________________________
The next generation of MSN Hotmail has arrived - Windows Live Hotmail
http://www.newhotmail.co.uk


[Attachment #5 (text/html)]

<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Hi,<br><br>The man page for dbus-uuigen states that the --get option will report the \
contents of the file /var/lib/dbus/machine-id, but on my system (Ubuntu Feisty \
(07.04)) it does not: the final byte is wrong.<br><br>I have looked into this in both \
the Ubuntu package sources and by inspection in the latest package (1.1.2) and \
believe the problem is because<br>when (in dbus-internals.c) \
_dbus_read_uuid_file_without_creating() <br>calls _dbus_string_copy_to_buffer() it \
does so with size 16 bytes, but the string needs a NULL termination: \
_dbus_string_copy_to_buffer() over-writes the last byte in the array.<br><br>Is this \
known about, in which case the man page should be adjusted, or the copy adjusted so \
that the terminal NULL byte is appended rather than over-writing.<br><br>I haven't \
checked to see if there is any impact on, e.g. \
--ensure.<br><br>David<br><br><br><br><br><br /><hr />Play Movie Mash-up and win  <a \
href='https://www.moviemashup.co.uk' target='_new'>BIG prizes! </a></body> </html>



_______________________________________________
dbus mailing list
dbus@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dbus


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic