[dev] [sic] null pointer in printf

2010-05-24 Thread Premysl Hruby
Hi,

in sic, if you use cmd ":m something" it will use null pointer as %s in
printf (in function privmsg), which is obviously bad idea (segfault or,
as in case of glibc it send unnecessary string "(null)".

For fix, see patch:

diff -r 503b48b13a77 sic.c
--- a/sic.c Tue Jul 29 19:22:08 2008 +0100
+++ b/sic.c Mon May 24 09:58:32 2010 +0200
@@ -77,8 +77,9 @@
else if(!strncmp(msg + 1, "l ", 2))
snprintf(bufout, sizeof bufout, "PART %s :sic - 250 LOC are too 
much!\r\n", msg + 3);
else if(!strncmp(msg + 1, "m ", 2)) {
-   if((p = strchr(msg + 3, ' ')))
-   *(p++) = 0;
+   if (!(p = strchr(msg + 3, ' ')))
+   return;
+   *(p++) = 0;
privmsg(msg + 3, p);
return;
}

-Ph


-- 
Premysl "Anydot" Hruby, http://www.redrum.cz/
-
I'm a signature virus. Please add me to your signature and help me spread!



Re: [dev] [surf]

2010-05-24 Thread stanio
* pancake  [2010-05-23 21:37]:
> I mean.. I want to have a fixed width of screen and only scroll
> vertically by adapting the text to fit the full width instead
> of following the page style.

If I understand correct, something like that might help a bit: in
style.css

body {width:300pt !important;}
* {max-width:300pt !important;}

-- 
 stanio_



[dev] libixp hg 118 install problems

2010-05-24 Thread Thomas Dahms

Hi,

the recent Makefile changes will install the libs always to /lib instead 
of $(PREFIX)/lib. Looking in /lib, I also found libwmii_hack.so there, 
so wmii probably has the same issue.


Also DESTDIR seems to be completely ignored.

--
Thomas Dahms



Re: [dev] [sic] null pointer in printf

2010-05-24 Thread Claudio M. Alessi
This bug is not present in tip anymore; feel free to upgrade your local sic
sources ;-)


Regards,
Claudio M. Alessi




Re: [dev] [sic] null pointer in printf

2010-05-24 Thread Kris Maglione
On Mon, 24 May 2010 10:02:47 +0200
Premysl Hruby  wrote:

> Hi,
> 
> in sic, if you use cmd ":m something" it will use null pointer as %s
> in printf (in function privmsg), which is obviously bad idea
> (segfault or, as in case of glibc it send unnecessary string "(null)".

I haven't come across a printf that segfaults when passed a null
pointer for %s. All of the BSDs handle it, along with uClibc and
dietlibc, and I seem to recall that Solaris/SunOS does as well.

> For fix, see patch:
> 
> diff -r 503b48b13a77 sic.c
> --- a/sic.c   Tue Jul 29 19:22:08 2008 +0100
> +++ b/sic.c   Mon May 24 09:58:32 2010 +0200
> @@ -77,8 +77,9 @@
>   else if(!strncmp(msg + 1, "l ", 2))
>   snprintf(bufout, sizeof bufout, "PART %s :sic - 250
> LOC are too much!\r\n", msg + 3); else if(!strncmp(msg + 1, "m ", 2))
> {
> - if((p = strchr(msg + 3, ' ')))
> - *(p++) = 0;
> + if (!(p = strchr(msg + 3, ' ')))
> + return;
> + *(p++) = 0;
>   privmsg(msg + 3, p);
>   return;
>   }

What version of sic are you using? The current version doesn't have
that code anymore.


-- 
Kris Maglione

FAITH, n.  Belief without evidence in what is told by one who speaks
without knowledge, of things without parallel.
--Ambrose Bierce




Re: [dev] [wmii] Resize snippet on wmii.suckless.org

2010-05-24 Thread Kris Maglione

On Sun, May 23, 2010 at 10:52:26PM +0200, pascal wrote:

I'm trying to figure out how to use this snippet for the sh script with no
luck (I suck completely at scripting). There has been some threads about
resizing from the keyboard earlier but I prefer the idea of a resizing mode
over a simple grow or nudge command. I'm using latest wmii-hg.
By the way I'm glad to see the [wmii] activity on the
hackers mailing-list again.


That snippet was always a bit fragile. It looks like it doesn't 
work with the current wmiirc (and it seems to have acquired a 
few bugs besides). I'll update it later, but it's part of the 
stock python wmiirc, anyway. Just start wmii with:


wmiir -r python/wmiirc

(or run wmiir xwrite /ctl spawn python/wmiirc)

--
Kris Maglione

It's always good to take an orthogonal view of something.  It develops
ideas.
--Ken Thompson




Re: [dev] libixp hg 118 install problems

2010-05-24 Thread Kris Maglione
On Mon, 24 May 2010 12:56:05 +0200
Thomas Dahms  wrote:

> Hi,
> 
> the recent Makefile changes will install the libs always to /lib
> instead of $(PREFIX)/lib. Looking in /lib, I also found
> libwmii_hack.so there, so wmii probably has the same issue.
> 
> Also DESTDIR seems to be completely ignored.

Not quite. It installs it to $(LIBDIR)/../../lib. It looks like it's
always been a bug, which just happened to be copacetic when the libs
were held in ../lib instead of ../../lib.

Thanks.

-- 
Kris Maglione

Testing can only prove the presence of bugs, not their absence.
--Edsger W. Dijkstra




[dev] problem: make deb

2010-05-24 Thread Davide Anchisi
Hi,

I am trying to build wmii 3.9 using "make deb", but it does not work.
It just report: make: *** [deb] Error 1

While "make deb"  DO work in building hg2631.

  Thanks,

  Davide



Re: [dev] problem: make deb

2010-05-24 Thread Kris Maglione
On Mon, 24 May 2010 15:08:49 +0200
Davide Anchisi  wrote:

> Hi,
> 
> I am trying to build wmii 3.9 using "make deb", but it does not work.
> It just report: make: *** [deb] Error 1
> 
> While "make deb"  DO work in building hg2631.

Sorry. All of my debian builds happen on the Ubuntu build farm. I don't
run debian myself, so it's a bit hard to test these things. I'll fix
the Makefile, but have you tried the Ubuntu PPA? It should work fine on
debian.

https://launchpad.net/~maglione-k/+archive/ppa
http://ppa.launchpad.net/maglione-k/ppa/ubuntu/pool/main/w/wmii/

-- 
Kris Maglione

The wireless telegraph is not difficult to understand.  The ordinary
telegraph is like a very long cat.  You pull the tail in New York, and
it meows in Los Angeles.  The wireless is the same, only without the
cat.
--Albert Einstein




Re: [dev] [sic] null pointer in printf

2010-05-24 Thread anonymous
On Mon, May 24, 2010 at 07:51:48AM -0400, Kris Maglione wrote:
> On Mon, 24 May 2010 10:02:47 +0200
> Premysl Hruby  wrote:
> What version of sic are you using? The current version doesn't have
> that code anymore.

Looks like 1.0.




Re: [dev] [sic] null pointer in printf

2010-05-24 Thread Kris Maglione
On Mon, 24 May 2010 19:16:52 +0400
anonymous  wrote:

> On Mon, May 24, 2010 at 07:51:48AM -0400, Kris Maglione wrote:
> > On Mon, 24 May 2010 10:02:47 +0200
> > Premysl Hruby  wrote:
> > What version of sic are you using? The current version doesn't have
> > that code anymore.
> 
> Looks like 1.0.

Anyone object to a 1.1 release?

-- 
Kris Maglione

Haskell is faster than C++, more concise than Perl, more regular than
Python, more flexible than Ruby, more typeful than C#, more robust
than Java, and has absolutely nothing in common with PHP.
--Autrijus Tang




Re: [dev] libixp hg 118 install problems

2010-05-24 Thread Thomas Dahms

Hi,

Am 24.05.2010 14:38, schrieb Kris Maglione:

Not quite. It installs it to $(LIBDIR)/../../lib. It looks like it's
always been a bug, which just happened to be copacetic when the libs
were held in ../lib instead of ../../lib.


The fix for wmii brings up a new problem (see below). This happens when 
trying to build an Arch package for wmii (not libixp) with both the AUR 
PKGBUILD and the one provided by you (which is a bit broken, btw). Seems 
that DESTDIR is ignored here, though it is set to ${pkgdir}.


...
MKDIR /usr/share/doc/wmii
INSTALL README
/bin/sh line 1: /usr/share/doc/wmii/README: Permission denied
make: *** [simpleinstall] Error 1

--
Thomas Dahms



Re: [dev] libixp hg 118 install problems

2010-05-24 Thread Kris Maglione

On Mon, May 24, 2010 at 09:03:29PM +0200, Thomas Dahms wrote:

Hi,

Am 24.05.2010 14:38, schrieb Kris Maglione:

Not quite. It installs it to $(LIBDIR)/../../lib. It looks like it's
always been a bug, which just happened to be copacetic when the libs
were held in ../lib instead of ../../lib.


The fix for wmii brings up a new problem (see below). This happens 
when trying to build an Arch package for wmii (not libixp) with both 
the AUR PKGBUILD and the one provided by you (which is a bit broken, 
btw). Seems that DESTDIR is ignored here, though it is set to 
${pkgdir}.


Sorry, minor typo. It should be fixed. How is the PKGBUILD 
broken? It works fine for me.


--
Kris Maglione

Microsoft is not the answer.  Microsoft is the question.  NO is the
answer.
--Eric Naggum




[dev] [surf] please recheck tip

2010-05-24 Thread Enno Boland (Gottox)
Hi!

Please recheck current tip of surf. If there are no big stoppers, I
will release it next week.

There are still some bugs regarding cookies, They are delayed to 0.5.

kind regards,

Enno



Re: [dev] libixp hg 118 install problems

2010-05-24 Thread Thomas Dahms

Sorry, minor typo. It should be fixed. How is the PKGBUILD broken? It
works fine for me.


It will probably work if you have a local clone of the repo and just do 
a makepkg therein.


If you look at it like the average user that tries to build a package, 
it works only when you already cloned the repo, so you have to comment 
out the _hgrepo and _hgroot lines on the first run, but then this "ln 
-snf" does not work, because the path exists, and then "cd $startdir" 
further below should read "cd $startdir/src/wmii" (or better "cd 
$srcdir/wmii" according to the Arch guidelines).


--
Thomas Dahms



Re: [dev] [surf] please recheck tip

2010-05-24 Thread Josh Rickmar
On Mon, May 24, 2010 at 09:33:10PM +0200, Enno Boland (Gottox) wrote:
> Hi!
> 
> Please recheck current tip of surf. If there are no big stoppers, I
> will release it next week.
> 
> There are still some bugs regarding cookies, They are delayed to 0.5.
> 
> kind regards,
> 
> Enno
> 

Downloads don't work, I get the error:

_SURF_HILIGHT: no closing quote

Also, is there a better way of doing cookies then wget?  As an (Open)BSD
user, I'd like to use something in base (I did install wget though to
test to make sure that wasn't the download problem above).



Re: [dev] libixp hg 118 install problems

2010-05-24 Thread Kris Maglione

On Mon, May 24, 2010 at 09:42:06PM +0200, Thomas Dahms wrote:

Sorry, minor typo. It should be fixed. How is the PKGBUILD broken? It
works fine for me.


It will probably work if you have a local clone of the repo and just 
do a makepkg therein.


If you look at it like the average user that tries to build a 
package, it works only when you already cloned the repo


That's exactly the point. If you don't have a local clone of the 
repo, you don't have the PKGBUILD, so there's no problem.


so you have to comment out the _hgrepo and _hgroot lines on the 
first run, but then this "ln -snf" does not work, because the 
path exists, and then "cd $startdir" further below should read 
"cd $startdir/src/wmii" (or better "cd $srcdir/wmii" according 
to the Arch guidelines).


The _hgrepo and _hgroot lines are already commented out, and the 
ln -snf line always works, because of the -f flag. Although, to 
be honest, I don't think it's necessary. It would probably work 
without it. The whole point of that PKGBUILD is that you can 
build the package straight from the repo without any fuss. 
Anyone who wants to do different can just use the AUR.


--
Kris Maglione

It is a farce to call any being virtuous whose virtues do not result
from the exercise of its own reason.
--Mary Wollstonecraft




[dev] Re: [sic] null pointer in printf

2010-05-24 Thread Premysl Hruby
On (24/05/10 10:02), Premysl Hruby wrote:
> Date: Mon, 24 May 2010 10:02:47 +0200
> From: Premysl Hruby 
> To: d...@suckless.org
> Subject: [sic] null pointer in printf
> User-Agent: Mutt/1.5.20 (2009-06-14)
> 
> Hi,
> 
> in sic, if you use cmd ":m something" it will use null pointer as %s in
> printf (in function privmsg), which is obviously bad idea (segfault or,
> as in case of glibc it send unnecessary string "(null)".
> 
> For fix, see patch:
> 

Whoops.

Sorry guys, as other write in the thread, this is for ld version
(1.0 from Jul 2008 :-). Looks like i somewhat forgot to update it on
this machine. So sorry I bothered you.

-Ph

-- 
Premysl "Anydot" Hruby, http://www.redrum.cz/
-
I'm a signature virus. Please add me to your signature and help me spread!