2005-11-08 23:52:35

by Robert Wlaschin

[permalink] [raw]
Subject: RE: [Bluez-devel] textfile.c find_key

Marcel,

It might possibly be. I'm using an Arm processor with the kernel version
2.6.10 for use with Busybox. It's probably a safe bet that not many people
are using an Arm processor so it could be something about that. I'll look
around.

Thanks,
Robert

-----Original Message-----
From: Marcel Holtmann [mailto:[email protected]]
Sent: Tuesday, November 08, 2005 2:14 PM
To: [email protected]
Subject: RE: [Bluez-devel] textfile.c find_key


Hi Robert,

> Normally I would agree with you but I tried it and there came a NULL
> -- to my great surprise. I could have a bug in the kernel I'm using
> or something else. If you aren't sure you can always try it out
> yourself and if I'm wrong there you go. If you could let me know the
> results you get I would appreciate it.
>
> I ran textfile_get on a file that is size 0. This should replicate
> the bug for you. I used test_textfile to test both the problem and
> the 'fix' -- sadly, being that the mmap documentation says that 0
> cannot be returned, I would say that the fix is a farce and mmap
> should be fixed instead.

I can't reproduce this problem. On a file with size 0 the textfile_get()
returns NULL as it should be. No segmentation fault or any other problem
so far. Maybe the kernel or your glibc is broken. What do you use?

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2005-11-09 00:03:09

by Marcel Holtmann

[permalink] [raw]
Subject: RE: [Bluez-devel] textfile.c find_key

Hi Robert,

> It might possibly be. I'm using an Arm processor with the kernel
> version 2.6.10 for use with Busybox. It's probably a safe bet that
> not many people are using an Arm processor so it could be something
> about that. I'll look around.

okay lets check for (map == NULL). The attached patch would do it the
right way.

Regards

Marcel


Attachments:
patch (676.00 B)