[go-nuts] replacement for filepath.HasPrefix?

2024-05-16 Thread Jochen Voss
Dear all, filepath.HasPrefix is deprecated, because it doesn't alway work. What would be a replacement for this function, which at least respects path boundaries, and maybe also ignores case when needed? All the best, Jochen -- You received this message because you are subscribed to the

[go-nuts] tls.VerifyClientCertIfGiven

2024-05-15 Thread Jochen Voss
Hello, In a server I use tls.Config.ClientAuth=tls.VerifyClientCertIfGiven. If then a client manages to connect and I can see a certificate in http.Request.TLS.PeerCertificates, does this just mean that the client has the certificate, or does this also prove that the client has the associated

Re: [go-nuts] generics question

2024-04-23 Thread Jochen Voss
c.Val { var ptr P = &(c.Val[i]) ptr.Set(v) } } var c = C[A, *A]{Val: []A{1, 2, 3}} On Tuesday 23 April 2024 at 03:36:25 UTC+1 Nagaev Boris wrote: > On Mon, Apr 22, 2024 at 9:54 PM Ian Lance Taylor wrote: > > > > On Mon, Apr 22, 2024 at 2:25 PM Jochen Voss wrote: > > &g

[go-nuts] generics question

2024-04-22 Thread Jochen Voss
Using generics, can I somehow write a constraint which says that *T (instead of T) implements a certain interface? The following code illustrated what I'm trying to do: type A int func (a *A) Set(x int) { *a = A(x) } type B string func (b *B) Set(x int) { *b = B(strconv.Itoa(x)) } type C1

[go-nuts] Re: heap profiling does not work on M2 MacBook air?

2024-01-27 Thread Jochen Voss
I've now filed https://github.com/golang/go/issues/65328 to report this. On Friday 3 March 2023 at 09:47:26 UTC Jochen Voss wrote: > Hi Peter, > > Thanks again for looking into this, and for your help! > > You mention that the blog post was long ago. I wonder whether the c

Re: [go-nuts] weblist in go tool pprof does not work for me

2023-09-27 Thread Jochen Voss
On 26 Sep 2023, at 6:20, Sergey Gorlov wrote: > Did you find a solution to this problem? I have the same problem with > weblist. No, I didn't. I think it's just broken. If I find time, I'll submit a bug report (unless somebody beats me to it). All the best, Jochen -- http://seehuhn.de/ --

[go-nuts] (minor) broken link in the Go 1.21 release notes.

2023-08-16 Thread Jochen Voss
Hello, Not really important, but there is a somewhat broken link in the Go 1.21 release notes. The introduction says "See “Go versions” in the “Go Toolchains” documentation for details", and this links to https://go.dev/doc/toolchain#versions The link goes to the beginning of the page,

[go-nuts] failed fuzz tests not reproducible when re-run

2023-08-02 Thread Jochen Voss
Dear all, Recently I find quite often that after "go test -fuzz" reported an error, the command shown to re-run the test does not reproduce the failure. For example, just now I got the following: voss@dumpling [..nt/tounicode2] go test -fuzz FuzzToUnicode fuzz: elapsed: 0s, gathering baseline

[go-nuts] Re: testing whether two maps are the same object

2023-07-18 Thread Jochen Voss
>>> >>> I don't think you need to check both maps when choosing a key. Once >>> you've found a candidate key in one map, you can test the other map and if >>> it *does* exist then the two maps aren't equal. You've then saved the >>> insertion and deletion step. I would

Re: [go-nuts] testing whether two maps are the same object

2023-07-18 Thread Jochen Voss
y, July 18, 2023 at 10:45:18 AM UTC-4 Jan Mercl wrote: > >> On Tue, Jul 18, 2023 at 4:35 PM Jochen Voss wrote: >> >> > Is there a better way? >> >> I have never been here and please don't do this: >> https://go.dev/play/p/x4QYJubXMnQ >> > -

[go-nuts] testing whether two maps are the same object

2023-07-18 Thread Jochen Voss
Dear all, To implement the "eq" operator in a simple PostScript interpreter, I need to determine whether two maps are the same object. This can be done by adding a new element to one map, and checking whether the new entry also appears in the second map, but as you can imagine, the resulting

[go-nuts] Re: finding the call graph of a method

2023-04-19 Thread Jochen Voss
Ah, found it! If I write types.NewPointer(reader.Type()) instead of just reader.Type(), things work better. On Tuesday, 18 April 2023 at 20:34:30 UTC+1 Jochen Voss wrote: > Dear all, > > I'm trying to find the callgraph of a method, using the following code: > > package

[go-nuts] finding the call graph of a method

2023-04-18 Thread Jochen Voss
Dear all, I'm trying to find the callgraph of a method, using the following code: package main import ( "log" "golang.org/x/tools/go/callgraph" "golang.org/x/tools/go/packages" "golang.org/x/tools/go/ssa/ssautil" ) func main() { cfg := {Mode: packages.LoadSyntax} initial, err :=

Re: [go-nuts] getting the size of an io.ReaderAt?

2023-04-01 Thread Jochen Voss
en you do not need to do that. > > > On Fri, Mar 31, 2023 at 4:30 PM Jochen Voss wrote: > >> Dear all, >> >> I am trying to get the size of an io.ReaderAt, i.e. the offset after >> which no more data can be read. I have some working (?) code ( >> https://

[go-nuts] getting the size of an io.ReaderAt?

2023-03-31 Thread Jochen Voss
Dear all, I am trying to get the size of an io.ReaderAt, i.e. the offset after which no more data can be read. I have some working (?) code (https://go.dev/play/p/wTouYbaJ7RG , also reproduced below), but I am not sure whether what I do is correct and the best way to do this. Some

[go-nuts] Re: heap profiling does not work on M2 MacBook air?

2023-03-03 Thread Jochen Voss
023 at 2:03:22 AM UTC-5 Jochen Voss wrote: > > Hi Peter, > > Thanks a lot, giving the "-alloc_space" option makes all the difference! > With this option, it also works for me. > > I wonder whether it meant to be the way that you have to give this > option. Mayb

[go-nuts] Re: heap profiling does not work on M2 MacBook air?

2023-03-01 Thread Jochen Voss
idn't need this option to get the profile output. All the best, Jochen On Thursday, 2 March 2023 at 04:12:24 UTC peterGo wrote: > Jochen Voss, > > On linux/amd64 > > xxx.go: https://go.dev/play/p/Wq_OU49LVQZ > > $ go build xxx.go && ./xxx > > $ go tool pprof xxx mem.pro

Re: [go-nuts] Re: heap profiling does not work on M2 MacBook air?

2023-03-01 Thread Jochen Voss
gt; 0 0% 100% 513.31kB 100% runtime.main > 0 0% 100% 513.31kB 100% > seehuhn.de/go/pdf/font/tounicode.init > > - sean > > > On Wed, Mar 1, 2023 at 11:25 PM Jochen Voss wrote: > >> The problem also occurs on AMD64 Linux, so it's

[go-nuts] Re: heap profiling does not work on M2 MacBook air?

2023-03-01 Thread Jochen Voss
The problem also occurs on AMD64 Linux, so it's not architecture specific. Hints would be most welcome! On Wednesday, 1 March 2023 at 13:55:30 UTC Jochen Voss wrote: > Dear all, > > I'm trying to profile memory use of a program, following the instructions > at https://go.de

[go-nuts] heap profiling does not work on M2 MacBook air?

2023-03-01 Thread Jochen Voss
Dear all, I'm trying to profile memory use of a program, following the instructions at https://go.dev/blog/pprof , but I can't get memory profiling to work. Am I doing things wrong, or is this broken? Simplified code is at https://go.dev/play/p/Wq_OU49LVQZ . (The code doesn't run on the

Re: [go-nuts] Another generics question

2023-02-18 Thread Jochen Voss
Thanks a lot! As an aside, the playgound is great. It made this conversation so much easier! All the best, Jochen On Saturday, 18 February 2023 at 01:31:16 UTC Ian Lance Taylor wrote: > On Fri, Feb 17, 2023 at 4:47 PM Jochen Voss wrote:, > > > > I would like to write a type c

[go-nuts] Another generics question

2023-02-17 Thread Jochen Voss
Hello, I would like to write a type constraint which matches types like the following: type v1 int func (obj v1) Add(other v1) v1 { return obj + other } type v2 string func (obj v2) Add(other v2) v2 { return obj + other } This should match anything with an Add() method which can

Re: [go-nuts] generics: can I require "comparable" together with some methods?

2023-02-17 Thread Jochen Voss
Thanks again, reading the blog post indeed solved the problem! On Friday, 17 February 2023 at 23:47:09 UTC Ian Lance Taylor wrote: > On Fri, Feb 17, 2023 at 3:34 PM Jochen Voss wrote: > > > > I'm trying to write a generic function like the following (simplified) > one: > &

Re: [go-nuts] generics: can I require "comparable" together with some methods?

2023-02-17 Thread Jochen Voss
at 23:47:09 UTC Ian Lance Taylor wrote: > On Fri, Feb 17, 2023 at 3:34 PM Jochen Voss wrote: > > > > I'm trying to write a generic function like the following (simplified) > one: > > > > type V interface { > > comparable // (1) > > SomeMethod(V) > > }

[go-nuts] generics: can I require "comparable" together with some methods?

2023-02-17 Thread Jochen Voss
Hello, I'm trying to write a generic function like the following (simplified) one: type V interface { comparable // (1) SomeMethod(V) } func Test[val V](x val) { m := make(map[val]int) // (2) // uses a x as key in a map and calls x.SomeMethod() } When I try this, see

[go-nuts] Re: regexp question

2023-02-10 Thread Jochen Voss
bavy wrote: > FindAllStringSubmatch() ? > https://pkg.go.dev/regexp#Regexp.FindAllStringSubmatch > > On Friday, 10 February 2023 at 12:52:34 UTC Jochen Voss wrote: > >> Dear all, >> >> What happens if a group in a regular expression matches repeatedly, via

[go-nuts] regexp question

2023-02-10 Thread Jochen Voss
Dear all, What happens if a group in a regular expression matches repeatedly, via the * operator? Experimentally I found that FindStringSubmatch then returns the text of the last match. Is this guaranteed somewhere (I didn't find anything about this on https://pkg.go.dev/regexp )? Also, is

[go-nuts] maps.Keys() does not work when keys are of type language.Tag

2022-10-06 Thread Jochen Voss
Hello, Using "golang.org/x/text/language" I have a map of type map[language.Tag]int. I would like to get the keys present in my map. Why does the following command not work? import "golang.org/x/exp/maps" ... var x map[language.Tag]int ... fmt.Println(maps.Keys(x)) The

[go-nuts] how to organise code with channels and error handling?

2022-09-23 Thread Jochen Voss
Dear all, I am writing a program which processes data in stages. To structure the code cleanly, I would like implement each stage as an individual function and use channels to pass data between stages. My questions: - How to structure the code? Is my approach described below reasonable? -

[go-nuts] returning struct vs. returning interface

2022-08-03 Thread Jochen Voss
Dear all, Why does the function NewReader [1] in compress/lzw return an io.ReadCloser instead of an *lzw.Reader? The docs say "It is guaranteed that the underlying type of the returned io.ReadCloser is a *Reader", so why not return a *Reader without wrapping? [1]

[go-nuts] weblist in go tool pprof does not work for me

2022-06-24 Thread Jochen Voss
Hello, For a while, the "weblist" command in go tool pprof has been broken for me ("list" still works). Is this a known issue? What can I do to fix this? What I am doing: - I am using "go version go1.18.3 darwin/arm64" on a MacBook Pro (M1 Pro processor). - I am profiling one of my unit

Re: [go-nuts] evaluation of range expression in for-range loop

2022-03-18 Thread Jochen Voss
iterate over the element > of the pointee, causing a nil-dereference panic. The clause allows this > code to work. > > On Fri, Mar 18, 2022 at 12:43 PM Jochen Voss wrote: > >> Dear all, >> >> The spec at https://go.dev/ref/spec#For_range says >> >> "

[go-nuts] evaluation of range expression in for-range loop

2022-03-18 Thread Jochen Voss
Dear all, The spec at https://go.dev/ref/spec#For_range says "The range expression x is evaluated once before beginning the loop, with one exception: if at most one iteration variable is present and len(x) is constant, the range expression is not evaluated." What does the second half of this

Re: [go-nuts] Pointer to a pointer

2022-03-15 Thread Jochen Voss
Thanks for the pointer to peano.go, this is fun! It took me a while to locate the file. In case others are interested: peano.go is at https://github.com/golang/website/blob/master/_content/doc/play/peano.go and can also be found by choosing "Peano Integers" from the top-right menu in the Go

Re: [go-nuts] is url->String->Parse != url a bug?

2022-03-04 Thread Jochen Voss
; my URL, and url2 would have the property I want. Or is there an easier way to obtain this "normalized" version? All the best, Jochen On Friday, 4 March 2022 at 13:31:50 UTC axel.wa...@googlemail.com wrote: > On Fri, Mar 4, 2022 at 2:12 PM Jochen Voss wrote: > >> If I convert an

[go-nuts] is url->String->Parse != url a bug?

2022-03-04 Thread Jochen Voss
Hello, If I convert an url.URL to a string and then parse the result, am I meant to get back the original url? While playing with the new fuzzer I found that in practise this is not the case, but I'm not sure whether this is due to bugs, or whether this is expected. The affected URLs are of

[go-nuts] feedback from my first experiment with generic go code

2022-02-16 Thread Jochen Voss
Dear all, Today I tried out the new generics support in Go for the first time by implementing Dijkstra's algorithm for the shortest path in a directed graph. In case it's interesting to somebody, here are my impressions, code is at https://github.com/seehuhn/go-dijkstra . The key parts of my

[go-nuts] type parameter names

2022-02-16 Thread Jochen Voss
Dear all, I stumbled across a difference between type names and type parameter names (in the go1.18 beta): I can re-use a type name as a variable name, but the same is not possible with type parameter names. Is this difference intentional? For illustration, the following code is valid

Re: [go-nuts] Re: golang-announce is blocked in Google Groups?

2022-01-21 Thread Jochen Voss
Same here, the problem seems to have gone away. On Thursday, 20 January 2022 at 19:37:54 UTC seank...@gmail.com wrote: > For me it did show as blocked a few hours earlier but works now > >> > -- >> > You received this message because you are subscribed to the Google >> Groups "golang-nuts"

[go-nuts] golang-announce is blocked in Google Groups?

2022-01-20 Thread Jochen Voss
Hello, It seems that golang-announce is blocked in Google Groups. When I try to access the group, I only get the following message: Banned content warning golang-announce has been identified as containing spam, malware or other malicious content. For more information about content

[go-nuts] Re: 410 Gone response from sum.golang.org for new module version?

2021-10-02 Thread Jochen Voss
Never mind, waiting fixed it. The package showed up around 40 minutes after I published it on github. All the best, Jochen On Saturday, 2 October 2021 at 11:11:23 UTC+1 Jochen Voss wrote: > Hello, > > I have just published a new version of my websocket library, but I cannot > ge

[go-nuts] 410 Gone response from sum.golang.org for new module version?

2021-10-02 Thread Jochen Voss
Hello, I have just published a new version of my websocket library, but I cannot get it to load into the client. The error message is as follows: > go get seehuhn.de/go/websocket@v1.1.0 go: downloading seehuhn.de/go/websocket v1.1.0 go get: seehuhn.de/go/websocket@v1.1.0: verifying

Re: [go-nuts] ParseInt confusion

2021-02-09 Thread Jochen Voss
Oh, yes, thank you and sorry about the noise! On Tuesday, 9 February 2021 at 17:02:41 UTC ja...@kastelo.net wrote: > An int8 has a range of -128 to +127. You may be looking for > strconv.ParseUint if you want an 8 bit unsigned int? > > //jb > > On 9 Feb 2021, at 17:51,

[go-nuts] ParseInt confusion

2021-02-09 Thread Jochen Voss
Dear all, The command strconv.ParseInt("256", 8, 8) should not return an error, because octal 256 is decimal 174 which fits into 8 bits. Right? I'm asking, because actually running this command gives 'strconv.ParseInt: parsing "256": value out of range'! https://play.golang.org/p/gNKN0kKLfDd

Re: [go-nuts] printing an empty slice with fmt.Printf()

2020-12-19 Thread Jochen Voss
Dear all, Thanks for your help. The solution is indeed to use "%x" instead of "%02x". My confusion was caused by the following sentence in the docs: "For compound operands such as slices and structs, the format applies to the elements of each operand". I never spotted the relevant exception

[go-nuts] printing an empty slice with fmt.Printf()

2020-12-18 Thread Jochen Voss
Hello, I can print slices of bytes as hex strings, using code like the following: x := []byte{0, 1, 2, 3} fmt.Printf("%02x", x[:l]) This gives the output "00010203" as expected. But this fails for the empty slice: running x := []byte{} fmt.Printf("%02x", x[:l]) gives "00" instead of

[go-nuts] Re: request for feedback: another websocket server implementation

2019-09-18 Thread Jochen Voss
2019 at 6:29:08 PM UTC-4, Jochen Voss wrote: >> >> Dear all, >> >> Because I wanted to learn about the websocket protocol, I have >> implemented a websocket server in Go: >> >> code: https://github.com/seehuhn/go-websocket >> documentation: http

[go-nuts] Re: request for feedback: another websocket server implementation

2019-09-18 Thread Jochen Voss
2019 at 6:29:08 PM UTC-4, Jochen Voss wrote: >> >> Dear all, >> >> Because I wanted to learn about the websocket protocol, I have >> implemented a websocket server in Go: >> >> code: https://github.com/seehuhn/go-websocket >> documentation: htt

[go-nuts] request for feedback: another websocket server implementation

2019-09-17 Thread Jochen Voss
Dear all, Because I wanted to learn about the websocket protocol, I have implemented a websocket server in Go: code: https://github.com/seehuhn/go-websocket documentation: https://godoc.org/seehuhn.de/go/websocket I would be happy to receive feedback about my code. Specific questions:

Re: [go-nuts] panic: interface conversion: interface is nil, not encoding.BinaryUnmarshaler

2019-08-16 Thread Jochen Voss
Hi Axel, Thanks a lot for looking into this. Your post makes things much clearer for me. In particular, I now think that I probably should not have (Un)MarshalBinary() methods on the interface type, but have them only on the concrete type instead. For example, this works:

Re: [go-nuts] panic: interface conversion: interface is nil, not encoding.BinaryUnmarshaler

2019-08-15 Thread Jochen Voss
Hi Axel, On Thursday, 15 August 2019 09:13:17 UTC+1, Axel Wagner wrote: > > I haven't really used gob much, so unfortunately I can't *really* help > you. But one thing to note is that you can dump the content of the buffer > and see that it doesn't actually contain the name of the type you are

Re: [go-nuts] panic: interface conversion: interface is nil, not encoding.BinaryUnmarshaler

2019-08-15 Thread Jochen Voss
> > On Wed, Aug 14, 2019 at 8:46 AM Jochen Voss > wrote: > >> Hello, >> >> I'm trying to read gob-encoded data into a variable of interface type. >> In simple cases, this works for me, but when I use a custom encoding >> via MarshalBinary() and Un

[go-nuts] panic: interface conversion: interface is nil, not encoding.BinaryUnmarshaler

2019-08-14 Thread Jochen Voss
Hello, I'm trying to read gob-encoded data into a variable of interface type. In simple cases, this works for me, but when I use a custom encoding via MarshalBinary() and UnmarshalBinary() methods, my code keeps crashing, with the error message panic: interface conversion: interface is

[go-nuts] Re: HTML template behaviour changed in Go 1.8?

2017-02-26 Thread Jochen Voss
Since this is a change in behaviour since Go 1.7.5, I have now reported this as a bug: https://github.com/golang/go/issues/19294 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it,

[go-nuts] HTML template behaviour changed in Go 1.8?

2017-02-26 Thread Jochen Voss
Hello, I am using Go templates to generated the files inside an EPUB container. Since I switched to Go version 1.8 the output of my rendered templates seems to be no longer deterministic and often bit which used to be always there are now missing. Minimal working (well, broken) example:

[PATCH] Add a test for the @cachit decorator.

2009-05-02 Thread Jochen Voss
Make sure that the caching decorator correctly copies over the function docstring and function name. This fixes issue #744 from the issue tracker. --- sympy/core/tests/test_cache.py | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) create mode 100644

primary_key for ImageField does not work any more

2008-09-01 Thread Jochen Voss
Hello, with Django 0.96 I used a model which contained the following field: class ImageFile(models.Model): [...] fname = models.ImageField(upload_to="images", primary_key=True, width_field="width", height_field="height") [...] When

Re: [Matplotlib-users] strangely shifted PostScript output when axis(off)

2008-02-27 Thread Jochen Voss
Hi Darren, On Wed, Feb 27, 2008 at 09:24:18AM -0500, Darren Dale wrote: I don't see the problem here with either 0.91.2, the maintanance branch, or the development branch. Maybe I dont know what I am looking for. Could you please send me an eps and png example so I can compare my results

Re: [Matplotlib-users] strangely shifted PostScript output when axis(off)

2008-02-27 Thread Jochen Voss
Hi Darren, On Wed, Feb 27, 2008 at 11:33:00AM -0500, Darren Dale wrote: Thanks for the images, I see what you are saying. However, when I run your broken.py script I dont see any problems. The ps and eps look like the png output. Hmmm, this is strange. I remember that things worked a bit

Re: [Matplotlib-users] strangely shifted PostScript output when

2008-02-26 Thread Jochen Voss
Hi Mark, On Tue, Feb 26, 2008 at 11:30:55AM +0100, Mark Bakker wrote: As a workaround, can you just turn the axis box and ticks off? xticks([]) yticks([]) setp(ax,'frame_on',False) Or does that give the same problem? Unfortunately the problem also occurs when I replace the axis(off)

[Matplotlib-users] strangely shifted PostScript output when axis(off)

2008-02-25 Thread Jochen Voss
Hi, I have a strange (to me) problem with matplotlib version 0.91.2, installed from source on a Debian Linux system. I try to generate a plot which combines bitmap data (using pcolor) and some lines (using plot) as in the appended script. I switch off the coordinate axes using the command

Bug#445554: /usr/sbin/newvserver: allow for unattended install

2007-10-06 Thread Jochen Voss
Package: vserver-debiantools Version: 0.4.1 Severity: wishlist File: /usr/sbin/newvserver Tags: patch [ Reportbug crashed on me while trying to send this the first time. I apologise, if you receive this twice. ] Hi, the appended patch modifies the newvserver script to allow for installs

Bug#444868: /usr/sbin/newvserver: allow to configure non-US and security mirrors

2007-10-01 Thread Jochen Voss
Package: vserver-debiantools Version: 0.3.6.1 Severity: wishlist File: /usr/sbin/newvserver Tags: patch Hi, in my VServer setup the clients initially don't have proper network access and thus need to use a mirror to download packages. To make this work I had to change newvserver to allow

Bug#444886: /usr/sbin/newvserver: try to get --ip or --hostname/--domain from name server information

2007-10-01 Thread Jochen Voss
Package: vserver-debiantools Version: 0.3.6.2 Severity: wishlist File: /usr/sbin/newvserver Tags: patch Hi, if you are creating many VServers using the newvserver script, it is a bit cumbersome to always give the correct combination of --hostname and --ip. An alternative strategy would be to

Bug#444886: updated patch for #444886

2007-10-01 Thread Jochen Voss
Hi, unfortunately my previous patch for bug #444886 contained a bug on its own: I forgot to define IP_ADDR and consequently newvserver generated a broken /etc/hosts file. The appended patch, a full replacement for the original one, fixes this problem. Changes since the previous version of the

Re: [PATCH] sky2: sky2 FE+ receive status workaround

2007-09-27 Thread Jochen Voss
Hi, On Thu, Sep 27, 2007 at 06:58:07AM -0700, Stephen Hemminger wrote: On Thu, 27 Sep 2007 09:14:11 +0100 Jochen Voß [EMAIL PROTECTED] wrote: On 27 Sep 2007, at 01:58, Stephen Hemminger wrote: + /* This chip has hardware problems that generates bogus status. + * So do only marginal

Bug#442908: valgrind: thousands of false positives on powerpc

2007-09-17 Thread Jochen Voss
Package: valgrind Version: 1:3.2.3-3 Severity: normal Hi, valgrind on my powerbook G4 reports several thousands of false (?) positives even for trivial programs. This makes valgrind unusable because any real problem reports will be drowned in the generated noise. Example: compile the following

Bug#426796: fix newvserver in the presence of a local name server

2007-08-19 Thread Jochen Voss
Hi, this is a suggested fix for bug #426796: if the host uses 127.0.0.1 as a nameserver, this cannot be used as a nameserver inside the container. One (partial) solution would be, to replace 127.0.0.1 with the host address on the interface given for the vserver subnet. This mewthod could be

Bug#431295: /usr/bin/setterm: buffer overflow in parse_snapfile()

2007-07-01 Thread Jochen Voss
Package: util-linux Version: 2.12r-19 Severity: normal File: /usr/bin/setterm Hi, the setterm source in util-linux-2.12r/misc-utils/setterm.c, function parse_snapfile, around line 513, contains the following bit of code: if (argc == 1) strcpy((char *)opt_all, argv[0]);

Bug#392452: /usr/sbin/exim_dbmbuild: buffer overflow in exim_dbmbuild

2007-06-10 Thread Jochen Voss
Hi Marc, On Sun, Jun 10, 2007 at 03:19:23PM +0200, Marc Haber wrote: Probably the following crash is a symptom of this: [EMAIL PROTECTED] [~] touch xxx [EMAIL PROTECTED] [~] /usr/sbin/exim_dbmbuild xxx $(python -c 'print a*') Segmentation fault It now says file

Bug#416303: upgrade-reports: upgrade report: success on a simple mail/web server

2007-03-26 Thread Jochen Voss
Package: upgrade-reports Severity: normal Hi, as requested by Frans Pop on dda, here is a Sarge-Etch upgrade report. Everything worked ok, details are below. I hope this helps, Jochen The machine --- a Qemu based virtual server, i386, 160MB of RAM running up to date sarge

Bug#416303: upgrade-reports: upgrade report: success on a simple mail/web server

2007-03-26 Thread Jochen Voss
Hi Frans, On Mon, Mar 26, 2007 at 08:39:34PM +0200, Frans Pop wrote: First of all, thanks! You are welcome! No, it says advantage of doing the _next_ step early would result in glibc being upgraded early. I understand your confusion though. Ok, I did not read carefully. That must mean that

Bug#416303: upgrade-reports: upgrade report: success on a simple mail/web server

2007-03-26 Thread Jochen Voss
Hi Frans, On Mon, Mar 26, 2007 at 08:39:34PM +0200, Frans Pop wrote: 4) During install the symbolic link /etc/apache2/sites-enabled/000-default appeared. This broke my common web server setup, because it slipped in between my own 0-redir and the virtual host definitions. Simply

Bug#411286: oprofile: does not work on AMD64, kernel 2.6.19.2

2007-02-17 Thread Jochen Voss
Package: oprofile Version: 0.9.2-3 Severity: normal Hello, oprofile does not work for me on an AMD64 system with vanilla 2.6.19.2 kernel. It fails with the following error message: tarte:~# opcontrol --start Using default event: CPU_CLK_UNHALTED:10:0:1:1 /usr/bin/opcontrol:

Bug#411286: patch for oprofile bug #411286

2007-02-17 Thread Jochen Voss
+ @@ -1,3 +1,11 @@ +oprofile (0.9.2-3.1) unstable; urgency=low + + * Apply the patches from http://lkml.org/lkml/2006/11/22/170 +and http://lkml.org/lkml/2006/11/22/172 to make oprofile +work on newer kernels. + + -- Jochen Voss [EMAIL PROTECTED] Sat, 17 Feb 2007 19:54:00 + + oprofile

Bug#400831: logic error in mutt-1.5.13/account.c

2006-11-28 Thread Jochen Voss
Package: mutt Version: 1.5.13-1 Severity: normal Hi, recently I came across the following bit of code in the source file mutt-1.5.13/account.c (near the end of the file): void mutt_account_unsetpass (ACCOUNT* account) { account-flags = !M_ACCT_PASS; } Since the flags field is

Bug#400131: /usr/lib/libdb3.so.3.0.2: logic error in qam_verify.c

2006-11-23 Thread Jochen Voss
Package: libdb3 Version: 3.2.9+dfsg-0.1 Severity: normal File: /usr/lib/libdb3.so.3.0.2 Hi, recently I came across the following bit of code in the source file db-3.2.9+dfsg/qam/qam_verify.c (function __qam_vrfy_data, around line 129): qflags = qp-flags; qflags =

Bug#397833: /usr/lib/cups/backend-available/snmp: programming error in snmp.c

2006-11-09 Thread Jochen Voss
Package: cupsys Version: 1.2.5-1 Severity: normal File: /usr/lib/cups/backend-available/snmp Hello, recently I came across the following bit of code in the source file cupsys-1.2.6/backend/snmp.c (function probe_device, around line 1755): if (http); { /* * IPP is supported...

Bug#397858: /usr/bin/mutt_dotlock: off-by-one error in mutt_dotlock.c

2006-11-09 Thread Jochen Voss
Package: mutt Version: 1.5.13-1 Severity: normal File: /usr/bin/mutt_dotlock Hello, recently I came across the following bit of code in the source file mutt-1.5.13/mutt_dotlock.c (function dotlock_deference_symlink, around line 557): if ((len = readlink (pathptr, linkfile, sizeof

Bug#397176: exim4: logic error in pcre.c and pcre_compile.c

2006-11-07 Thread Jochen Voss
Hello Marc, On Tue, Nov 07, 2006 at 05:41:03PM +0100, Marc Haber wrote: This bug is not relevant to Debian's exim4 anyway ... Oh, sorry about that, I am always tricked by these unused bits of code. I will try to check more careful in the future. Thanks for spotting this, upstream was able to

Bug#397151: logic error in X509 policy checking

2006-11-07 Thread Jochen Voss
Hi Kurt, On Tue, Nov 07, 2006 at 11:14:47PM +0100, Kurt Roeckx wrote: It seems upstream already fixed this in HEAD/0.9.9: Great! Will we get a fixed version in Etch or is it too late for this? All the best, Jochen -- http://seehuhn.de/ signature.asc Description: Digital signature

Bug#397536: format string vulnerability in eperl_perl5.c

2006-11-07 Thread Jochen Voss
Package: eperl Version: 2.2.14-14 Severity: normal Hello, recently I came across the following bit of code in the source file eperl-2.2.14/eperl_perl5.c (function 'Perl5_Run', around line 215): if ((cpBuf = ePerl_ReadErrorFile(perlstderr, perlscript, source)) != NULL) {

Bug#397151: /usr/lib/libcrypto.so.0.9.8: logic error in X509 policy checking

2006-11-05 Thread Jochen Voss
Package: libssl0.9.8 Version: 0.9.8c-3 Severity: normal File: /usr/lib/libcrypto.so.0.9.8 Hello, recently I came across the following bit of code in the source file openssl-0.9.8c/crypto/x509v3/pcy_tree.c (function tree_init, around line 200): if (!(x-ex_flags

Bug#397174: apache2: logic error in source file pcre.c

2006-11-05 Thread Jochen Voss
Package: apache2 Version: 2.2.3-3 Severity: normal Hello, recently I came across the following bit of code in the source file apache2-2.2.3/srclib/pcre/pcre.c (function compile_branch, around line 3366): /* Condition to test for a numbered subpattern match. We know that if a

Bug#397176: exim4: logic error in pcre.c and pcre_compile.c

2006-11-05 Thread Jochen Voss
Package: exim4 Version: 4.63-8 Severity: normal Hello, recently I came across the following bit of code in the source file exim4-4.63/src/pcre/pcre.c (function compile_branch, around line 3355): /* Condition to test for a numbered subpattern match. We know that if a digit

Bug#397183: nmap: logic errors in regular expression parsing code

2006-11-05 Thread Jochen Voss
Package: nmap Version: 4.11-1 Severity: normal Hello, recently I found some logic errors in nmap's copy of the pcre library. 1) in the file nmap-4.11/libpcre/pcre_dfa_exec.c (function internal_dfa_exec, around line 1120) I find the following statement: int otherd = -1; if ((ims

Bug#397188: noshell: please update license file (is titantool still free?)

2006-11-05 Thread Jochen Voss
Package: noshell Version: 4.0.11-4 Severity: normal Hello, it seems that the noshell license file in /usr/share/doc/noshell/copyright is out of date: The differences between the file in the source package and in the Debian directory are as follows: --- cs 2006-11-05 18:04:27.0

Bug#397183: nmap: logic errors in regular expression parsing code

2006-11-05 Thread Jochen Voss
Hi Fyodor, On Sun, Nov 05, 2006 at 11:47:23AM -0800, Fyodor wrote: On Sun, Nov 05, 2006 at 05:15:55PM +, Jochen Voss wrote: recently I found some logic errors in nmap's copy of the pcre library. Thanks for the report. Nmap currently uses LibPCRE 6.4. The latest version

Bug#397174: apache2: logic error in source file pcre.c

2006-11-05 Thread Jochen Voss
Package: apache2 Version: 2.2.3-3 Severity: normal Hello, recently I came across the following bit of code in the source file apache2-2.2.3/srclib/pcre/pcre.c (function compile_branch, around line 3366): /* Condition to test for a numbered subpattern match. We know that if a

Bug#397174: closed by Peter Samuelson [EMAIL PROTECTED] (Re: Bug#397174: apache2: logic error in source file pcre.c)

2006-11-05 Thread Jochen Voss
Hi Peter, On Sun, Nov 05, 2006 at 10:48:33AM -0800, Debian Bug Tracking System wrote: This code is a copy of the pcre3 library, bundled by upstream for convenience. Debian does not use it. Oh, I missed this. Sorry for the noise and thanks for answering quickly. All the best, Jochen --

Bug#396958: /usr/bin/X: several off-by-one errors in debian/local/xserver-wrapper.c

2006-11-03 Thread Jochen Voss
Package: x11-common Version: 1:7.1.0-5 Severity: normal File: /usr/bin/X Hello, recently I discovered the following bits of code in the source file debian/local/xserver-wrapper.c (function 'main', starting at line 172): int main(int argc, char **argv) { ... char

Bug#396958: /usr/bin/X: several off-by-one errors in debian/local/xserver-wrapper.c

2006-11-03 Thread Jochen Voss
Package: x11-common Version: 1:7.1.0-5 Severity: normal File: /usr/bin/X Hello, recently I discovered the following bits of code in the source file debian/local/xserver-wrapper.c (function 'main', starting at line 172): int main(int argc, char **argv) { ... char

Bug#392866: squid: buffer overflow in src/tools.c

2006-10-13 Thread Jochen Voss
Package: squid Version: 2.6.4-1 Severity: normal Hello, recently I discovered the following bit of code in the source file src/tools.c (function 'parseEtcHosts', around line 1169): void parseEtcHosts(void) { FILE *fp; char buf[1024]; char buf2[512];

Bug#392880: gcc-4.1: off-by-one error for string initialiser warnings

2006-10-13 Thread Jochen Voss
Package: gcc-4.1 Version: 4.1.1-16 Severity: normal Hello, one very useful feature of gcc is, that it warns you when you produce unterminated strings by using too long initialisers. Unfortunately the warning only kicks in, if the initialiser is at least two bytes longer than the string buffer.

Bug#392880: gcc-4.1: off-by-one error for string initialiser warnings

2006-10-13 Thread Jochen Voss
Package: gcc-4.1 Version: 4.1.1-16 Severity: normal Hello, one very useful feature of gcc is, that it warns you when you produce unterminated strings by using too long initialisers. Unfortunately the warning only kicks in, if the initialiser is at least two bytes longer than the string buffer.

Bug#392651: emacs21: bug in 'xbm_read_bitmap_data' (file xfns.c)

2006-10-12 Thread Jochen Voss
Package: emacs21 Version: 21.4a-6.2 Severity: normal Hello, recently I discovered the following bit of code in the source file src/xfns.c (function 'xbm_read_bitmap_data', starting at line 6705): if (LA1 == XBM_TK_NUMBER); { char *p = strrchr (buffer, '_'); p =

Bug#392656: netkit-base: off-by-one error in rpcgen

2006-10-12 Thread Jochen Voss
Package: netkit-base Version: 0.10-10.3 Severity: normal Hello, recently I noticed the following bit of code in the source file rpc_cout.c (near the end): static char *upcase(const char *str) { char *ptr, *hptr; ptr = malloc(strlen(str)); if (ptr == NULL) {

Bug#392669: /usr/sbin/sshd: off-by-one error in function 'xmmap'

2006-10-12 Thread Jochen Voss
Package: openssh-server Version: 1:4.3p2-5 Severity: normal File: /usr/sbin/sshd Hello, recently I discovered the following bit of code in the source file openssh-4.3p2/openbsd-compat/xmmap.c (function 'xmmap', around line 51): #define MM_SWAP_TEMPLATE /var/run/sshd.mm. if

Bug#392663: apt: off-by-one errors in extracttar.cc

2006-10-12 Thread Jochen Voss
Package: apt Version: 0.6.46.2 Severity: normal Hello, recently I discovered the following bits of code in apt-inst/contrib/extracttar.cc: // The on disk header for a tar file. struct ExtractTar::TarHeader { char Name[100];

Bug#392455: /usr/sbin/p0f: buffer overflow in p0f.c

2006-10-11 Thread Jochen Voss
Package: p0f Version: 2.0.5-1 Severity: normal File: /usr/sbin/p0f Hello, recently I discovered the following bit of code in the source file p0f-2.0.5/p0f.c (function main): _u8 buf[MAXLINE*4]; ... if (argv[optind] *(argv[optind])) { sprintf(buf,(%s) and

  1   2   3   4   5   6   >