From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4951 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: looking at fmtmsg-is dprintf oom-safe? Date: Thu, 24 Apr 2014 09:57:44 -0700 Message-ID: <20140424165743.GA643@muslin> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1398358663 14520 80.91.229.3 (24 Apr 2014 16:57:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Apr 2014 16:57:43 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4955-gllmg-musl=m.gmane.org@lists.openwall.com Thu Apr 24 18:57:36 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WdMxr-0006qn-Iz for gllmg-musl@plane.gmane.org; Thu, 24 Apr 2014 18:57:35 +0200 Original-Received: (qmail 32185 invoked by uid 550); 24 Apr 2014 16:57:32 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32177 invoked from network); 24 Apr 2014 16:57:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=FXlG3M0lDNhyqJmYX7ordttMzQzPTZDi6B7q4sUQVV0=; b=T3wLcdAOiR8avEO7ev3lnOze4VnrMViL97p3XtjEO5Z7WQoo8dWAmALgYtGY5FucK8 xbgRPls9GhBqCVEWxsE3pesLUBbKOYNT44KgJ3Zp64CSDOA/yv/lhHJq6IlqkIovxEC1 U7mczCX7dD82mLjNPAZb2aKhrmsVIsF639yNSdoDuh54K35A5cuarK9IK7ZH/ql9+YwV 1edhdtgWhpNoleyWTbecd3gxabHfSXzhwxkxxYxWsqtUjU2bueB+WerlesCwqc30zYqP a2dZh+nwiwcpa6W7IcM2/bqgFXqh91cxDLsfCxr6VxBp6IqaHcjZkum358WIME83AtPX wk4Q== X-Received: by 10.68.195.104 with SMTP id id8mr4905558pbc.102.1398358639020; Thu, 24 Apr 2014 09:57:19 -0700 (PDT) Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4951 Archived-At: Hello, I've been poking at fmtmsg(), since if I added that and used sdbm for dbm.h, I'd have XSI coverage. Due to the use case for fmtmsg (reporting errors, including terminal errors), I expect it needs to work even when malloc() fails. My understanding is that this would exclude using fopen(). I could use several calls to write() (I currently have a preliminary version that does this), but dprintf() would be more optimal. As far as I can tell, dprintf() should still work when malloc() fails, but I'd like to confirm this. Thanks, Isaac Dunham