Bug 184529 - multitail: crashes parsing command line options
Summary: multitail: crashes parsing command line options
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: multitail
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Folkert van Heusden
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-03-09 17:38 UTC by Jose Pedro Oliveira
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2006-04-20 12:49:11 UTC


Attachments (Terms of Use)
patch to remove two warnings (1.21 KB, patch)
2006-03-10 13:41 UTC, Jose Pedro Oliveira
no flags Details | Diff
color_print prototype changes: patch (1.46 KB, patch)
2006-03-13 18:32 UTC, Jose Pedro Oliveira
no flags Details | Diff

Description Jose Pedro Oliveira 2006-03-09 17:38:03 UTC
Description of problem:
Multitail crashes parsing the command line options.
For example if the -s is used without its argument, multitail segfaults.


Version-Release number of selected component (if applicable):
multitail-3.8.7-3

How reproducible:
Always

Steps to Reproduce:
# multitail -s /var/log/messages
--- output ---
 --*- multitail 3.8.7 (C) 2003-2006 by folkert@vanheusden.com -*--

Segmentation fault
--------------

Comment 1 Folkert van Heusden 2006-03-09 17:45:06 UTC
Unfortunately this is a user-error: -s expects a value indicating the number of
columns to split the window in. I totally agree that it should not segfault when
omitting this value so I will fix this in the next version. In fact I already
fixed it in the last few minutes but I wait a little to see if more errors are
found.

Comment 2 Jose Pedro Oliveira 2006-03-10 13:41:39 UTC
Created attachment 125942 [details]
patch to remove two warnings

Folkert,

Small patch to remove two warnings in the header files:

  version.h:4: warning: âversion_strâ defined but not used
  colors.h:16: warning: âMY_COLORSâ defined but not use

It adds a couple of const keywords.

jpo

Comment 3 Folkert van Heusden 2006-03-10 13:51:17 UTC
merged, thanks

Comment 4 Jose Pedro Oliveira 2006-03-13 18:32:21 UTC
Created attachment 126061 [details]
color_print prototype changes: patch

Folkert,

A couple of warnings can be eliminated if the color_print string argument is
changed from
   unsigned char *
to
   char *

I think this be applied safely without breaking anything (at least in Linux
evrything works fine).

jpo

Comment 5 Folkert van Heusden 2006-03-13 19:33:01 UTC
Hi,

It is this way as color_print needs unsigned chars later on because it needs to
see if bit 7 is set (e.g. ascii > 127).

Comment 6 Jose Pedro Oliveira 2006-03-13 20:06:06 UTC
(In reply to comment #5)
> Hi,
> 
> It is this way as color_print needs unsigned chars later on because it needs to
> see if bit 7 is set (e.g. ascii > 127).

Ok.

Thks,
jpo

PS - ping me if you need me to import a new multitail version


Comment 7 Jose Pedro Oliveira 2006-03-14 16:30:57 UTC
Folkert,

multitail 3.8.9 still seg faults with the following command line:
   multitail -s

jpo

Comment 8 Folkert van Heusden 2006-03-14 16:43:51 UTC
Woops. Did not backport fix from development to stable. Now definately fixed.
Tried it with
multitail -s
multitail -cS
as well as
multitail -s INSTALL
multitail -cS INSTALL


Comment 9 Jose Pedro Oliveira 2006-03-14 16:52:38 UTC
Could you also change the html files to avoid this line in the specfile?

   sed -i 's/\r//' *.html

Thanks in advance,
jpo

Comment 10 Folkert van Heusden 2006-03-14 16:56:41 UTC
Ok. will be fixed in the next stable release

Comment 11 Jose Pedro Oliveira 2006-03-30 18:15:58 UTC
Folkert,

Can I update multitail to 3.8.10? The specfile patch will be the following:


diff -u -r1.2 multitail.spec
--- multitail.spec      14 Mar 2006 15:57:38 -0000      1.2
+++ multitail.spec      30 Mar 2006 18:20:29 -0000
@@ -1,5 +1,5 @@
 Name: multitail
-Version: 3.8.9
+Version: 3.8.10
 Release: 1%{?dist}
 Summary: View one or multiple files like tail but with multiple windows

@@ -29,7 +29,6 @@

 %prep
 %setup -q
-%{__sed} -i 's/\r//' *.html

 %build
 CFLAGS="%{optflags}" %{__make} %{?_smp_mflags}
@@ -52,6 +51,9 @@
 %{_bindir}/multitail

 %changelog
+* Thu Mar 30 2006 Folkert van Heuesden <folkert@vanheusden.com> - 3.8.10-1
+- Updated to release 3.8.10.
+
 * Tue Mar 14 2006 Folkert van Heuesden <folkert@vanheusden.com> - 3.8.9-1
 - Updated to release 3.8.9.



Comment 12 Folkert van Heusden 2006-03-30 18:18:27 UTC
Ah yes, please do. Sorry that I forgot to write you! Been quit busy with the new
development release.

Comment 13 Jose Pedro Oliveira 2006-03-30 18:37:45 UTC
Folkert,

Imported and built for FC-4, FC-5 and development. Build logs available here: 

   http://buildsys.fedoraproject.org/build-status/success.psp

jpo

PS - multitail 3.8.10 still segfaults with the following command line "multitail -s"

Comment 14 Jose Pedro Oliveira 2006-04-20 12:49:11 UTC
Problem fixed since version 4.0.0.
Multitail version 4.0.3 is now available in the FE mirrors (FC-4, FC-5, and devel).


Note You need to log in before you can comment on or make changes to this bug.