Advertisement
v1999430

Untitled

Dec 17th, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. @r@
  2. expression e1,e2;
  3. position p;
  4. @@
  5.  
  6. (
  7. fn32(e1, \(sizeof(u32)\|4\) )
  8. |
  9. fn32@p(e1, e2)
  10. )
  11.  
  12. @script:python@
  13. p << r.p;
  14. @@
  15.  
  16. print "dangerous second argument in %s:%s" % (p[0].file,p[0].line)
  17.  
  18. @@ identifier tmp; expression ptr; expression y,e; type T; @@
  19.  
  20. - tmp = cpu_to_le32(y);
  21.  
  22. <+... when != tmp
  23. (
  24. - memcpy(ptr, (T)&tmp, \(sizeof(u32)\|4\));
  25. |
  26. - memcpy@p(ptr, (T)&tmp, ...);
  27. )
  28. + put_unaligned_le32(y,ptr);
  29. ...+>
  30. ? tmp = e
  31.  
  32. @@ type T; identifier tmp; @@
  33.  
  34. - T tmp;
  35. ...when != tmp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement