Question 6 Our source function is source and our sink function is sink. What is the tainted flow in the code below? 1 int main(int argc, char *argv]) { char *x - nullptr; 3 while (argc) { 4. sink(x);...


Please do both


Question 6<br>Our source function is source and our sink function is sink. What is the tainted flow in the code<br>below?<br>1 int main(int argc, char *argv]) {<br>char *x - nullptr;<br>3<br>while (argc) {<br>4.<br>sink(x);<br>5<br>X = source);<br>6.<br>--argc;<br>7<br>8 }<br>O x@2 to x@5<br>О ха5 to x@4<br>O There is no tainted flow.<br>O x@2 to x@4<br>Question 7<br>Our source function is source and our sink function is sink. source never returns null. What is the<br>tainted flow in the code below?<br>1 void foo(char *arg) {<br>2<br>if (arg == nullptr) {<br>sink(arg);<br>4<br>}<br>5 }<br>7<br>int main(void) {<br>8<br>char *x = source();<br>9.<br>foo(x);<br>10<br>char *y = nullptr;<br>11<br>foo(y);<br>12 }<br>O x@8 to y@11<br>There is no tainted flow.<br>O x@8 to x@9<br>x@8 to arg@3<br>

Extracted text: Question 6 Our source function is source and our sink function is sink. What is the tainted flow in the code below? 1 int main(int argc, char *argv]) { char *x - nullptr; 3 while (argc) { 4. sink(x); 5 X = source); 6. --argc; 7 8 } O x@2 to x@5 О ха5 to x@4 O There is no tainted flow. O x@2 to x@4 Question 7 Our source function is source and our sink function is sink. source never returns null. What is the tainted flow in the code below? 1 void foo(char *arg) { 2 if (arg == nullptr) { sink(arg); 4 } 5 } 7 int main(void) { 8 char *x = source(); 9. foo(x); 10 char *y = nullptr; 11 foo(y); 12 } O x@8 to y@11 There is no tainted flow. O x@8 to x@9 x@8 to arg@3

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here