Bug #15899
openabsolutely nothing about srchtxt(1) works
0%
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.
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.