lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 9 Mar 2010 13:00:38 +0000
From:	"Hennerich, Michael" <Michael.Hennerich@...log.com>
To:	"gregkh@...e.de" <gregkh@...e.de>
CC:	"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	"uclinux-dist-devel@...ckfin.uclinux.org" 
	<uclinux-dist-devel@...ckfin.uclinux.org>,
	Jonathan Cameron <jic23@....ac.uk>
Subject: [PATCH] iio_trigger_find_by_name: Skip trailing newline if available

Skip trailing newline if available.

Signed-off-by: Michael Hennerich <Michael.Hennerich@...log.com>
Acked-by: Jonathan Cameron <jic23@....ac.uk>

Index: drivers/staging/iio/industrialio-trigger.c
===================================================================
--- drivers/staging/iio/industrialio-trigger.c  (revision 8368)
+++ drivers/staging/iio/industrialio-trigger.c  (working copy)
@@ -155,6 +155,9 @@
        struct iio_trigger *trig;
        bool found = false;

+       if (len && name[len - 1] == '\n')
+               len--;
+
        mutex_lock(&iio_trigger_list_lock);
        list_for_each_entry(trig, &iio_trigger_list, list) {
                if (strncmp(trig->name, name, len) == 0) {

------------------------------------------------------------------
********* Analog Devices GmbH              Open Platform Solutions
**  *****
**     ** Wilhelm-Wagenfeld-Strasse 6
**  ***** D-80807 Munich
********* Germany
Registergericht München HRB 40368,  Geschäftsführer: Thomas Wessel, William A. Martin, Margaret K. Seif


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ