Project

General

Profile

Actions

Bug #15899

open

absolutely nothing about srchtxt(1) works

Added by Rich Lowe 13 days ago. Updated 11 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
cmd - userland programs
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

In trying to get srchtxt(1) 64-bit clean, or otherwise decide what to do with it on ARM I found that, even on x86, absolutely nothing about it works.

; srchtxt
zsh: segmentation fault (core dumped)
; srchtxt -l C -m FMD.mo error
<FMD.mo:3> due to an erroroneous configuration file.  Refer to %s for more information.
zsh: segmentation fault (core dumped) 
; srchtxt -l C
<FMNOTIFY.mo:1>
<FMNOTIFY.mo:2>f-subject-template
<STORAGE.mo:1>
<STORAGE.mo:2>rity
<STORAGE.mo:3> inaccessible.
<STORAGE.mo:4>\377\036
zsh: segmentation fault (core dumped) 

The best I can say is that srchtxt -? gets me a usage message, although it's incorrect

; srchtxt -?
srchtxt: illegal option -- ?
usage: srchtxt [-s]
       srchtxt [-s] -l locale
       srchtxt [-s] [-l locale] [-m msgfile,...] [text]
; srchtxt foo
usage: srchtxt [-s]
       srchtxt [-s] -l locale
       srchtxt [-s] [-l locale] [-m msgfile,...] [text]

Note how it describes -l and -m as being optional, in the 3rd invocation form, but seemingly at least one is mandatory.

Actions #1

Updated by Rich Lowe 11 days ago

The problem with naked srchtxt is that it tries to interpret the LCL_DATA file as a message catolog, which it is not. And chokes on it.

Actions #2

Updated by Rich Lowe 11 days ago

In fact the problem in general seems to be that srchtxt expects to find only files for use with gettxt(3C) (notably not gettext(3C)), but does absolutely no sanitization of what it finds and chokes whatever it is given.

Further, it seems like the files it expects to find have no magic number or anything, but instead start with a 4-byte indicator of the number of messages, so it's not even clear what we could do to make this work.

Actions

Also available in: Atom PDF